Script installers and default php version failures


I have a Centos 7 box running VM 4.14. There are 3 x php versions installed from the remi repo: 5.4, 5.5, 5.6 and all are successfully recognised by VM and can be changed via the PHP Versions option in the virtual server config.

However, there are 2 failures that are quite frustrating:

  1. When I try to modify the server templates and choose the default php version for new virtual servers, it fails to save with the error: PHP scripts cannot be run as the domain owner unless the php command is installed

  2. When I try to run script installers (specifically Wordpress, and not by choice!) it results in an error saying it is unable to determine the php version.

My guess is that they are both related, as it appears to be php version detection that is somehow failing. Is it possible that someone could help me debug this please?

From shell both php -v and php-cgi -v return the version as expected.

I've checked in /etc/webmin/miniserv.error and there's nothing of relevance there.




Oh it's worth mentioning that both php and php-cgi are alias settings in profile.d:

# cat /etc/profile.d/
alias php='php56'
alias php-cgi='php56-cgi'

We unfortunately don't do any testing with PHP versions from third party software repositories, so it is possible to run into issues with that.

However, it sounds like maybe there isn't actually a "php" or "php-cgi" command, as they're both aliases in this case?

What is the output of these two commands:

which php
which php-cgi

Sorry for the delay in getting back to you on this. The output is:

# which php
alias php='php56'
# which php-cgi
alias php-cgi='php56-cgi'

So yeah, I see what you mean, perhaps it's possible that the alias could be replicated for Virtualmin's test during the script installer?

Okay, at the moment, those particular paths wouldn't be supported.

We'll look deeper into that though.

One quick question before we do a little digging -- where are the config files for PHP 5.6 stored?

Are they by chance in /etc/php56/php.ini?

They are actually in:


5.6 is the default, but the rest are selectable from within Virtualmin.