php-cli in different PHP version than MultiPHP selection in EA4
HI.
I am using CloudLinux and EA4 and have noticed a problem with MultiPHP.
On one account it is set to inherit the system native PHP version which is 5.6.
An addon domain on the account is set to use PHP 7.0, however when this addon domain runs shell commands it is running them in PHP 5.6.
I am not sure if this is not configured properly, if it is design to use the accounts native PHP version.
As you can see, artisan is running under /opt/cpanel/ea-php56/root/usr/bin/php The domain.co.uk is actually set to use PHP 7.0 in MultiPHP. Is it possible to make PHP run in the set PHP version? Thanks
[user@server domain.co.uk]$ ps aux | grep artisan
user 305491 1.0 0.2 463252 37968 pts/0 S 13:17 0:00 /opt/cpanel/ea-php56/root/usr/bin/php /home/user/domain.co.uk/artisan queue:work --tries=3
user 305513 0.0 0.0 112648 964 pts/0 S+ 13:17 0:00 grep --color=auto artisanAs you can see, artisan is running under /opt/cpanel/ea-php56/root/usr/bin/php The domain.co.uk is actually set to use PHP 7.0 in MultiPHP. Is it possible to make PHP run in the set PHP version? Thanks
-
Hi, Can you put in a ticket on this? The PHP wrapper should be picking up the working directory properly and running PHP70. 0 -
I have opened a ticket (8386671). Thanks 0 -
Hello, To update, it looks like this is working as expected. Here's a quote from the support ticket that explains how this works: The PHP binary finds the version specified for the directory you are currently in (not the directory the file exists in). If you do not run the command from the document root for the domain (where .user.ini and php.ini exist) it will use the system default version.
Thank you.0
Please sign in to leave a comment.
Comments
3 comments