Problem with PHP extensions

Hi.
I need some php extensions installed like gd and mbstring
I’m using virtualmin with several php versions

The following PHP versions are available : 5.6.40 (/bin/php-cgi), 7.0.27 (/opt/rh/rh-php70/root/usr/bin/php-cgi), 7.2.24 (/opt/rh/rh-php72/root/usr/bin/php-cgi), 5.6 (mod_php)

The following PHP execution modes are available : mod_php cgi fcgid fpm

The following PHP-FPM versions are available on this system : 7.0.27 (rh-php70-php-fpm)

I’m using the php72w version (7.2.24) in the domain I’m working on.
I tried to install the php72w-gd but I got an error.

[root@eos modules]# yum install php72w-gd
Loaded plugins: fastestmirror, protectbase
Loading mirror speeds from cached hostfile

  • base: mirror.tedra.es
  • centos-sclo-rh: mirror.tedra.es
  • centos-sclo-sclo: mirror.tedra.es
  • epel: mirrors.bytes.ua
  • extras: mirror.tedra.es
  • updates: mirror.tedra.es
  • webtatic: uk.repo.webtatic.com
    139 packages excluded due to repository protections
    Resolving Dependencies
    –> Running transaction check
    —> Package php72w-gd.x86_64 0:7.2.27-1.w7 will be installed
    –> Processing Dependency: php72w-common(x86-64) = 7.2.27-1.w7 for package: php72w-gd-7.2.27-1.w7.x86_64
    –> Running transaction check
    —> Package php72w-common.x86_64 0:7.2.27-1.w7 will be installed
    –> Processing Conflict: php72w-common-7.2.27-1.w7.x86_64 conflicts php-common < 7.2
    –> Finished Dependency Resolution
    Error: php72w-common conflicts with php56w-common-5.6.40-1.w7.x86_64
    You could try using --skip-broken to work around the problem
    You could try running: rpm -Va --nofiles --nodigest

Even I tried to uninstall the php 5.6.40 version to avoid the conflict

[root@eos modules]# yum remove php56*
Loaded plugins: fastestmirror, protectbase
Resolving Dependencies
–> Running transaction check
—> Package php56w.x86_64 0:5.6.40-1.w7 will be erased
—> Package php56w-bcmath.x86_64 0:5.6.40-1.w7 will be erased
—> Package php56w-cli.x86_64 0:5.6.40-1.w7 will be erased
—> Package php56w-common.x86_64 0:5.6.40-1.w7 will be erased
—> Package php56w-devel.x86_64 0:5.6.40-1.w7 will be erased
—> Package php56w-fpm.x86_64 0:5.6.40-1.w7 will be erased
—> Package php56w-imap.x86_64 0:5.6.40-1.w7 will be erased
—> Package php56w-intl.x86_64 0:5.6.40-1.w7 will be erased
—> Package php56w-mbstring.x86_64 0:5.6.40-1.w7 will be erased
—> Package php56w-mcrypt.x86_64 0:5.6.40-1.w7 will be erased
—> Package php56w-mysql.x86_64 0:5.6.40-1.w7 will be erased
—> Package php56w-odbc.x86_64 0:5.6.40-1.w7 will be erased
—> Package php56w-opcache.x86_64 0:5.6.40-1.w7 will be erased
—> Package php56w-pdo.x86_64 0:5.6.40-1.w7 will be erased
—> Package php56w-pear.noarch 1:1.10.4-1.w7 will be erased
—> Package php56w-process.x86_64 0:5.6.40-1.w7 will be erased
—> Package php56w-xml.x86_64 0:5.6.40-1.w7 will be erased
—> Package php56w-xmlrpc.x86_64 0:5.6.40-1.w7 will be erased
–> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================
Package Arch Version Repository Size

Removing:
php56w x86_64 5.6.40-1.w7 @webtatic 9.3 M
php56w-bcmath x86_64 5.6.40-1.w7 @webtatic 94 k
php56w-cli x86_64 5.6.40-1.w7 @webtatic 9.2 M
php56w-common x86_64 5.6.40-1.w7 @webtatic 8.6 M
php56w-devel x86_64 5.6.40-1.w7 @webtatic 13 M
php56w-fpm x86_64 5.6.40-1.w7 @webtatic 4.7 M
php56w-imap x86_64 5.6.40-1.w7 @webtatic 207 k
php56w-intl x86_64 5.6.40-1.w7 @webtatic 797 k
php56w-mbstring x86_64 5.6.40-1.w7 @webtatic 2.7 M
php56w-mcrypt x86_64 5.6.40-1.w7 @webtatic 97 k
php56w-mysql x86_64 5.6.40-1.w7 @webtatic 476 k
php56w-odbc x86_64 5.6.40-1.w7 @webtatic 198 k
php56w-opcache x86_64 5.6.40-1.w7 @webtatic 314 k
php56w-pdo x86_64 5.6.40-1.w7 @webtatic 397 k
php56w-pear noarch 1:1.10.4-1.w7 @webtatic 2.1 M
php56w-process x86_64 5.6.40-1.w7 @webtatic 157 k
php56w-xml x86_64 5.6.40-1.w7 @webtatic 671 k
php56w-xmlrpc x86_64 5.6.40-1.w7 @webtatic 165 k

Transaction Summary

Remove 18 Packages

Installed size: 54 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : 1:php56w-pear-1.10.4-1.w7.noarch 1/18
Erasing : php56w-5.6.40-1.w7.x86_64 2/18
Erasing : php56w-process-5.6.40-1.w7.x86_64 3/18
Erasing : php56w-xml-5.6.40-1.w7.x86_64 4/18
Erasing : php56w-odbc-5.6.40-1.w7.x86_64 5/18
Erasing : php56w-imap-5.6.40-1.w7.x86_64 6/18
Erasing : php56w-intl-5.6.40-1.w7.x86_64 7/18
Erasing : php56w-xmlrpc-5.6.40-1.w7.x86_64 8/18
Erasing : php56w-mcrypt-5.6.40-1.w7.x86_64 9/18
Erasing : php56w-opcache-5.6.40-1.w7.x86_64 10/18
Erasing : php56w-mysql-5.6.40-1.w7.x86_64 11/18
Erasing : php56w-pdo-5.6.40-1.w7.x86_64 12/18
Erasing : php56w-bcmath-5.6.40-1.w7.x86_64 13/18
Erasing : php56w-fpm-5.6.40-1.w7.x86_64 14/18
Erasing : php56w-mbstring-5.6.40-1.w7.x86_64 15/18
Erasing : php56w-devel-5.6.40-1.w7.x86_64 16/18
Erasing : php56w-cli-5.6.40-1.w7.x86_64 17/18
Erasing : php56w-common-5.6.40-1.w7.x86_64 18/18
warning: /etc/php.ini saved as /etc/php.ini.rpmsave
Verifying : php56w-devel-5.6.40-1.w7.x86_64 1/18
Verifying : php56w-mbstring-5.6.40-1.w7.x86_64 2/18
Verifying : php56w-common-5.6.40-1.w7.x86_64 3/18
Verifying : php56w-fpm-5.6.40-1.w7.x86_64 4/18
Verifying : php56w-bcmath-5.6.40-1.w7.x86_64 5/18
Verifying : php56w-mysql-5.6.40-1.w7.x86_64 6/18
Verifying : php56w-opcache-5.6.40-1.w7.x86_64 7/18
Verifying : php56w-5.6.40-1.w7.x86_64 8/18
Verifying : php56w-mcrypt-5.6.40-1.w7.x86_64 9/18
Verifying : php56w-pdo-5.6.40-1.w7.x86_64 10/18
Verifying : php56w-xmlrpc-5.6.40-1.w7.x86_64 11/18
Verifying : php56w-intl-5.6.40-1.w7.x86_64 12/18
Verifying : php56w-cli-5.6.40-1.w7.x86_64 13/18
Verifying : php56w-process-5.6.40-1.w7.x86_64 14/18
Verifying : 1:php56w-pear-1.10.4-1.w7.noarch 15/18
Verifying : php56w-imap-5.6.40-1.w7.x86_64 16/18
Verifying : php56w-xml-5.6.40-1.w7.x86_64 17/18
Verifying : php56w-odbc-5.6.40-1.w7.x86_64 18/18

Removed:
php56w.x86_64 0:5.6.40-1.w7 php56w-bcmath.x86_64 0:5.6.40-1.w7 php56w-cli.x86_64 0:5.6.40-1.w7
php56w-common.x86_64 0:5.6.40-1.w7 php56w-devel.x86_64 0:5.6.40-1.w7 php56w-fpm.x86_64 0:5.6.40-1.w7
php56w-imap.x86_64 0:5.6.40-1.w7 php56w-intl.x86_64 0:5.6.40-1.w7 php56w-mbstring.x86_64 0:5.6.40-1.w7
php56w-mcrypt.x86_64 0:5.6.40-1.w7 php56w-mysql.x86_64 0:5.6.40-1.w7 php56w-odbc.x86_64 0:5.6.40-1.w7
php56w-opcache.x86_64 0:5.6.40-1.w7 php56w-pdo.x86_64 0:5.6.40-1.w7 php56w-pear.noarch 1:1.10.4-1.w7
php56w-process.x86_64 0:5.6.40-1.w7 php56w-xml.x86_64 0:5.6.40-1.w7 php56w-xmlrpc.x86_64 0:5.6.40-1.w7

Complete!

I installed the two php extensions succesfully.

[root@eos ~]# yum install php72w-gd
Loaded plugins: fastestmirror, protectbase
Loading mirror speeds from cached hostfile

  • base: mirror.tedra.es
  • centos-sclo-rh: mirror.tedra.es
  • centos-sclo-sclo: mirror.tedra.es
  • epel: mirrors.bytes.ua
  • extras: mirror.tedra.es
  • updates: mirror.tedra.es
  • webtatic: uk.repo.webtatic.com
    139 packages excluded due to repository protections
    Resolving Dependencies
    –> Running transaction check
    —> Package php72w-gd.x86_64 0:7.2.27-1.w7 will be installed
    –> Processing Dependency: php72w-common(x86-64) = 7.2.27-1.w7 for package: php72w-gd-7.2.27-1.w7.x86_64
    –> Running transaction check
    —> Package php72w-common.x86_64 0:7.2.27-1.w7 will be installed
    –> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================================
Package Arch Version Repository Size

Installing:
php72w-gd x86_64 7.2.27-1.w7 webtatic 139 k
Installing for dependencies:
php72w-common x86_64 7.2.27-1.w7 webtatic 1.3 M

Transaction Summary

Install 1 Package (+1 Dependent package)

Total download size: 1.4 M
Installed size: 13 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): php72w-gd-7.2.27-1.w7.x86_64.rpm | 139 kB 00:00:01
(2/2): php72w-common-7.2.27-1.w7.x86_64.rpm | 1.3 MB 00:00:01

Total 651 kB/s | 1.4 MB 00:00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : php72w-common-7.2.27-1.w7.x86_64 1/2
Installing : php72w-gd-7.2.27-1.w7.x86_64 2/2
Verifying : php72w-common-7.2.27-1.w7.x86_64 1/2
Verifying : php72w-gd-7.2.27-1.w7.x86_64 2/2

Installed:
php72w-gd.x86_64 0:7.2.27-1.w7

Dependency Installed:
php72w-common.x86_64 0:7.2.27-1.w7

Complete!

yum install php72w-mbstring
[root@eos ~]# yum install php72w-mbstring
Loaded plugins: fastestmirror, protectbase
Loading mirror speeds from cached hostfile

  • base: mirror.tedra.es
  • centos-sclo-rh: mirror.tedra.es
  • centos-sclo-sclo: mirror.tedra.es
  • epel: mirrors.bytes.ua
  • extras: mirror.tedra.es
  • updates: mirror.tedra.es
  • webtatic: uk.repo.webtatic.com
    139 packages excluded due to repository protections
    Resolving Dependencies
    –> Running transaction check
    —> Package php72w-mbstring.x86_64 0:7.2.27-1.w7 will be installed
    –> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================
Package Arch Version Repository Size

Installing:
php72w-mbstring x86_64 7.2.27-1.w7 webtatic 587 k

Transaction Summary

Install 1 Package

Total download size: 587 k
Installed size: 3.2 M
Is this ok [y/d/N]: y
Downloading packages:
php72w-mbstring-7.2.27-1.w7.x86_64.rpm | 587 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : php72w-mbstring-7.2.27-1.w7.x86_64 1/1
Verifying : php72w-mbstring-7.2.27-1.w7.x86_64 1/1

Installed:
php72w-mbstring.x86_64 0:7.2.27-1.w7

Complete!

I restarted httpd service but I got the error.

[root@eos modules]# systemctl restart httpd
Job for httpd.service failed because the control process exited with error code. See “systemctl status httpd.service” and “journalctl -xe” for details.
[root@eos modules]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2020-03-18 22:35:34 CET; 8s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 27077 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 27076 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 27076 (code=exited, status=1/FAILURE)

Mar 18 22:35:34 eos.olympus.lh systemd[1]: Starting The Apache HTTP Server…
Mar 18 22:35:34 eos.olympus.lh httpd[27076]: AH00526: Syntax error on line 445 of /etc/httpd/conf/httpd.conf:
Mar 18 22:35:34 eos.olympus.lh httpd[27076]: Invalid command ‘php_admin_value’, perhaps misspelled or defined by a module not included …uration
Mar 18 22:35:34 eos.olympus.lh systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 18 22:35:34 eos.olympus.lh kill[27077]: kill: cannot find process “”
Mar 18 22:35:34 eos.olympus.lh systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 18 22:35:34 eos.olympus.lh systemd[1]: Failed to start The Apache HTTP Server.
Mar 18 22:35:34 eos.olympus.lh systemd[1]: Unit httpd.service entered failed state.
Mar 18 22:35:34 eos.olympus.lh systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

Now there is no php version installed only the version that virtualmin has installed.
[root@eos ~]# php -v
-bash: php: command not found

That is because httpd is not starting probably.
Now I have the php extesions intalled but I can start apache.
But how can I use the php extesion I need in virtualmin in the diferent domains without any conflict with the php version installed in the system by default?

Thank in advance.
Regards.