Webmin check reveals some errors

Greetings friends! I am struggling to configure my Centos 7.3 server to work with newer versions of PHP via the command line. They are showing up in the system check

The following PHP versions are available : 5.4.16 (/bin/php-cgi), 5.5.21 (/opt/rh/php55/root/usr/bin/php-cgi), 7.0.27 (/opt/rh/php70/root/usr/bin/php-cgi), 7.1.30 (/opt/rh/rh-php71/root/usr/bin/php-cgi), 7.2.24 (/opt/rh/rh-php72/root/usr/bin/php-cgi)

After this message I get the following error:

The following PHP-FPM versions cannot be used : 5.4.16 (Apache module mod_proxy is missing or not enabled)

Unfortunately (for me at least) I cannot find any definitive procedure on how to change the PHP in the CLI nor can I find which version of mod_proxy to install much less how to configure it. If you have experience with these issues, you help is highly appreciated! Thanks!!


You can change PHP from CLI running the following command:

virtualmin modify-web --domain DOMAIN.COM --php-version 5.4

Thanks for your suggestion Ilia! Unfortunately, I still have PHP 5.4.16 from the command line when logged in as this user.

$ php -v
PHP 5.4.16 (cli) (built: Nov 1 2019 16:04:20)
Copyright © 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright © 1998-2013 Zend Technologies

I ran the command as:

virtualmin modify-web --domain ezmenus.net --php-version 7.2

It said the updates were applied, I even restarted the HTTPD service, but I still get the old PHP version.

What else can I do to change the PHP version from the shell??


Give PHP-FPM what it needs - load mod_proxy.

You can change PHP version and execution mode from UI. There is no need to use CLI, unless you have to. Type in autocomplete search bar for Website options and PHP.

As an example, here is what my Apache on CentOS 7 has enabled by default:

[root@debug-centos7 ~]# httpd -M | grep proxy
 proxy_module (shared)
 proxy_ajp_module (shared)
 proxy_balancer_module (shared)
 proxy_connect_module (shared)
 proxy_express_module (shared)
 proxy_fcgi_module (shared)
 proxy_fdpass_module (shared)
 proxy_ftp_module (shared)
 proxy_http_module (shared)
 proxy_scgi_module (shared)
 proxy_wstunnel_module (shared)