LVE, PHP Selector
Announcement
Collapse
No announcement yet.
PHP selection change for account in CageFS appears to not take effect for that account
Collapse
X
-
I am running a CloudLinux/cPanel server. The main PHP for the server is v5.6.17.
I have one account on the server that needs to run PHP v5.2. I installed CageFS and when I run this command I see the user is accuratly within the CageFS group:
Code:/usr/sbin/cagefsctl --list-enabled
Did I miss a step in activating the PHP version change for this account? I also ran these commands, but they don;t seem to have helped:
Code:/usr/sbin/cagefsctl --enable-all cagefsctl --force-update
-
You still have to install PHP Selector!
- Scott
Comment
-
Hi, thanks for your help. Yes that was the very first thing I did And I just re-ran the commands and it says either the packages are already installed and there is nothing else to update. I also made just the Selector had all the versions inside the LVE.
I there anything else I can do to troubleshoot and find the problem and solution? Thanks~
Comment
-
Do you see 5.2 selected in users panel > Select PHP version ?
What php version is shown when called from console? Try following:
Code:su -l username -s /bin/bash php -v
Code:/usr/local/cpanel/bin/rebuild_phpconf --current
Comment
-
Thanks for your help. In cPanel, when I login as that use rand then visit the "Select PHP Version" page I see:
Current PHP version: 5.3
And I also see a dropdown list of 4.4 to 7.0 with "native 5.6" at the bottom. But when I check the users own php version I get this result showing it is using the native v5.6:
> root@websiteserver999 [~]# su -l MYUSERNAME -s /bin/bash
> MYUSERNAME@websiteserver999 [~]# php -v
> PHP 5.6.17 (cli) (built: Jan 22 2016 17:16:17)
> Copyright (c) 1997-2015 The PHP Group
> Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
> with the ionCube PHP Loader v4.7.5, Copyright (c) 2002-2014, by ionCube Ltd.
Here is the php mode info:
> root@websiteserver999 [~]# /usr/local/cpanel/bin/rebuild_phpconf --current
> Available handlers: suphp dso cgi none
> DEFAULT PHP: 5
> PHP4 SAPI: none
> PHP5 SAPI: suphp
> SUEXEC: enabled
> RUID2: not installed
Are there hints in there of a conflict or problem?
Comment
-
So far from above information I can tell the following:
PHP-Selector is installed and activated
you are using right PHP mode in apache
there were no errors entering cagefs
However something is not Ok with actual switching procedure - php -v shows wrong version. Issue is not in apache, but somewhere in system.
As of now please show:
Code:sysctl -a | grep links
Code:su -l username -s /bin/bash whoami ls -la /usr/local/bin/php ls -la /etc/cl.selector/php-cli
Comment
-
Thanks for your help. Here are the outputs:
Code:sysctl -a | grep links fs.protected_symlinks = 0 fs.protected_hardlinks = 0 fs.protected_symlinks_create = 0 fs.protected_hardlinks_create = 0 fs.protected_symlinks_allow_gid = 488 fs.protected_hardlinks_allow_gid = 488 fs.enforce_symlinksifowner = 1
Code:USERNAME@website01 [~]# whoami USERNAME USERNAME@website01 [~]# ls -la /usr/local/bin/php -rwxr-xr-x 1 root root 30334986 Jan 22 17:16 /usr/local/bin/php* USERNAME@website01 [~]# ls -la /etc/cl.selector/php-cli lrwxrwxrwx 1 USERNAME USERNAME 26 Jan 24 14:21 /etc/cl.selector/php-cli -> /opt/alt/php53/usr/bin/php*
Comment
-
Ok, Im lost now .
Please create ticket at https://helpdesk.cloudlinux.com so we could check the issue in place.
Comment
-
I have just checked this ticket and it appears suphp was compiled without LVE support. Things got fixed running /usr/sbin/cpanel-compile-suphp.sh .
However, how possible you have got wrong PHP version in this post??
> root@websiteserver999 [~]# su -l MYUSERNAME -s /bin/bash
> MYUSERNAME@websiteserver999 [~]# php -v
> PHP 5.6.17 (cli) (built: Jan 22 2016 17:16:17)
Comment
-
Hmmm... same problem. I just created a new account for a different site on this server. Then I went to the users cPanel and switch PHP to 5.2. It appeared to change in cPanel, but when i ran php -v I see the user is still running v5.6.17.
I will go ahead and re-run the patch like I did yesterday, but is that necessary? In the future each time I create a new account, should I tell the user to inform me when/if they chaneg PHP so I can run patches on the entire server? Thanks for your advice~
Comment
-
Been doing more work the past few hours. It is working now, but strange. So when I run this for the user:
Code:su -l username -s /bin/bash php -v
Comment
Comment