Hi
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:
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
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.
Thanks
Comments
Submitted by VirtualNoob on Tue, 03/10/2015 - 05:12 Comment #1
Oh it's worth mentioning that both php and php-cgi are alias settings in profile.d:
# cat /etc/profile.d/php.sh
alias php='php56'
alias php-cgi='php56-cgi'
Submitted by andreychek on Tue, 03/10/2015 - 10:36 Comment #2
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
Submitted by VirtualNoob on Wed, 04/01/2015 - 10:13 Comment #3
Sorry for the delay in getting back to you on this. The output is:
# which php
alias php='php56'
/usr/bin/php56
# which php-cgi
alias php-cgi='php56-cgi'
/usr/bin/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?
Submitted by andreychek on Thu, 04/02/2015 - 09:31 Comment #4
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?
Submitted by VirtualNoob on Thu, 04/02/2015 - 09:44 Comment #5
They are actually in:
/opt/remi/php56/root/etc
/opt/remi/php55/root/etc
/opt/remi/php54/root/etc
5.6 is the default, but the rest are selectable from within Virtualmin.
Thanks