Changing PHP version for a virtual server fails

Long story short, changing PHP version for Virtual Server Configuration > PHP Versions from PHP 5.6 (installed per https://www.virtualmin.com/documentation/web/multiplephp) back to PHP 5.4.16 didn't want to take any effect, so I proceeded to removing PHP 5.6 from the system running:

yum remove rh-php56*
yum remove rhscl-rh-php56-epel-6-x86_64.noarch

restarted Apache, but the website is showing Internal Server Error. The Apache error log shows relevant lines:

[Wed May 11 16:44:58.366473 2016] [mpm_prefork:notice] [pid 6362] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 PHP/5.4.16 SVN/1.7.14 mod_perl/2.0.9dev Perl/v5.16.3 configured -- resuming normal operations
[Wed May 11 16:44:58.366505 2016] [core:notice] [pid 6362] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
php5.6.fcgi: line 10: /opt/rh/rh-php56/root/usr/bin/php-cgi: No such file or directory

So it seems to still be looking for PHP 5.6. Rebooting the server didn't help.

Status: 
Active

Comments

Troubleshooting this further proved that if a website is web-protected then PHP version won't change. Removing web-protection from the website and then changing the PHP version worked successfully. I believe this founding should be reflected in *min's code to save users from this kind of not easily detectable confusions in posterity.

Also despite PHP 5.6 was completely removed from the system every virtual server now has "PHP 5.6 Configuration" under "Services".

I believe on Virtualmin systems with multiple PHP versions, it should be possible to uninstall additional PHP versions through Virtualmin's UI and together with that process all the UI references and links to the removed PHP version should be also removed.

Did you remove PHP 5.6 by just un-installing the package? Unfortunately right now Virtualmin doesn't detect that and adjust the CGI / FCGI scripts ... even when the removal is done via the UI.

Yes, I did. I know Jamie there is too much on your plate right now after PHP 7 release, upgrade of virtualmin.com, switching to Authentic Theme, etc. So let's keep this issue open and I hope some day soon it will be possible to to smoothly manage multiple PHP versions on Virtualmin systems.