Process List Shows Native PHP Running When It Isn't
Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Anonymous User
  2. Thursday, 06 April 2017
  3.  Subscribe via email
I have PHP selector on giving my accounts the choice between CL's versions of PHP56, PHP70 and PHP71.

Most are now on PHP71 and if I pull up a web page to display PHPINFO (temporarily enabled for the purpose) it shows the same version.

If I disable modules or modify PHP options in the selected version, this is reflected in the behaviour of the account.

So it appears to all intents and purposes as if the selected PHP version is running.

But!

If I create a PHP script in the same account which is set to take a long time to run so I can see it in the process list (ps -ef) or by looking in WHM's interface version of the same, I see it showing that it's running under the native PHP 5.6.

Eg.

49457 (Trace) (Kill) accountname 0 0.55 0.20 /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/accountname/public_html/slowphp.php

The same script outputs PHPINFO which shows:

PHP Version 7.1.3

Is this normal? Any thoughts on what the heck's going on?

TY!
Rate this post:
  1. 06.04.2017 14:04:30
  2. # 1
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
Hello,

Those files from CageFS inside are actually a symbolic links to right binaries, e.g.:


# su -l bogdan1
[[email protected] ~]$ ls -la /opt/cpanel/ea-php56/root/usr/bin/php-cgi
lrwxrwxrwx 1 root root 23 Apr 6 09:05 /opt/cpanel/ea-php56/root/usr/bin/php-cgi -> /etc/cl.selector/ea-php
[[email protected] ~]$ ls -la /etc/cl.selector/ea-php
lrwxrwxrwx 1 bogdan1 bogdan1 3 Apr 4 13:57 /etc/cl.selector/ea-php -> php
[[email protected] ~]$ ls -la /etc/cl.selector/php
lrwxrwxrwx 1 root root 30 Apr 4 13:57 /etc/cl.selector/php -> /opt/alt/php52/usr/bin/php-cgi
[[email protected] ~]$ ls -la /opt/alt/php52/usr/bin/php-cgi
-rwxr-xr-x 1 root 984 3420824 Feb 25 18:13 /opt/alt/php52/usr/bin/php-cgi


And from outside they are visible as regular EA files instead of alt-php files.
  1. 06.04.2017 14:04:04
  2. # 2
JeffS Accepted Answer
Thanks for your reply!

So this is expected behaviour?

Does it mean I absolutely have to have the native PHP from cPanel in place in order for it to work, even if not one account/user is still using the native PHP version?
  1. 06.04.2017 14:04:59
  2. # 3
JeffS Accepted Answer
Thanks for your reply!

So this is expected behaviour?

Does it mean I absolutely have to have the native PHP from cPanel in place in order for it to work, even if not one account/user is still using the native PHP version?
  1. 06.04.2017 14:04:39
  2. # 4
Anonymous Accepted Answer
Posts: 0
Joined: 22.08.2019
0
Votes
Undo
For some reason my replies are hidden. You can see them if you hit the quotation mark next to where they should be shown.
  1. 06.04.2017 14:04:30
  2. # 5
Anonymous Accepted Answer
Posts: 0
Joined: 22.08.2019
0
Votes
Undo
Last try...

Thanks for your reply!

So this is expected behaviour?

Does it mean I absolutely have to have the native PHP from cPanel in place in order for it to work, even if not one account/user is still using the native PHP version?
  1. 06.04.2017 18:04:46
  2. # 6
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
Thanks for your reply!

So this is expected behaviour?

Does it mean I absolutely have to have the native PHP from cPanel in place in order for it to work, even if not one account/user is still using the native PHP version?


Yes, that is expected behaviour. That is how selector works from CageFS inside. Yes, at least one native php version is required to have things working properly.
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.