How to install PHP extensions like GD when domain has different PHP version

Setup: Centos 7.3.1611, Webmin 1.840, Virtualmin 5.07

I successfully installed multiple php versions as described in I’m trying to install Owncloud in one of my virtual domains, with PHP 7 as php version.
Owncloud requires modules (like GD) that are not available in (my install of) php 7. When I install these on the command line, they seem to become available for php 5.4.16 but not for php 7. So I tried this:

  1. copy from usr/lib64/php/modules to /opt/rh/rh-php70/root/usr/lib64/php/modules
  2. added to the loaded php.ini, which is in the virtual domain at etc/php7.0
  3. restarted apache
But that didn't work, so I'm hoping someone at the forum knows the correct procedure, or can point me to a previously given answer. Btw. It's not just gd. All of the installed php modules are only listed with the first php, not the chosen one.

Found it myself: in my setup extra php7 modules can be installed from SCL ( In that repository module names are prefixed with rh. So GD can be installed using:
yum install rh-php70-php-gd

Thanks for putting this in Ben… helped a long search :slight_smile:

Winner Winner Chicken Dinner. Exactly what I needed. THX