PHP 5.6 not showing script it is executing

Krydos

Well-Known Member
Jun 2, 2012
59
9
58
cPanel Access Level
Root Administrator
So, I have a CentOS 7 server with the latest version of cPanel using EasyApache4 with multiple versions of PHP. For some reason PHP 5.6 isn't showing what script it is running. For instance in

WHM >> Server Status >> Daily Process Log

it shows stuff like this

Code:
username | domain | %cpu | /opt/cpanel/ea-php56/root/usr/bin/php-cgi
username | domain | %cpu | /opt/cpanel/ea-php71/root/usr/bin/php-cgi /home/username/public_html/script.php
When PHP 7.1 is used it shows the script that PHP is executing, but when PHP 5.6 is executing a script the argument for php-cgi is empty. I've checked the output of top, htop, ps, etc. and they are all lacking the /path/to/script.php portion as well. All of my other CentOS 7 servers running the same version of cpanel show the script for all the versions of PHP including 5.6. It's just this one server that's behaving strangely.

Any ideas or suggestions of something to try to get the command to show up properly?
 

Krydos

Well-Known Member
Jun 2, 2012
59
9
58
cPanel Access Level
Root Administrator
Well, I still don't know what went wrong, but I completely uninstalled php 5.6 and all of it's modules. After I reinstalled everything it is working as expected now. Hopefully this post helps anyone who has the same thing happen to them find a solution to fix it...
 

24x7server

Well-Known Member
Apr 17, 2013
1,913
99
78
India
cPanel Access Level
Root Administrator
Twitter
Hi,

Similar things have occurred with me too.. In my case, it was likely the suPHP was not working even though it was installed and when I reinstalled the PHP version, everything went back on track... Might be handlers or the way cPanel builds easyapache for PHP does not went wrong at the first instance..
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,250
463
When PHP 7.1 is used it shows the script that PHP is executing, but when PHP 5.6 is executing a script the argument for php-cgi is empty.
Hello,

Were you using the same PHP handler for both versions of PHP?

Thank you.
 

Krydos

Well-Known Member
Jun 2, 2012
59
9
58
cPanel Access Level
Root Administrator
Were you using the same PHP handler for both versions of PHP?
Yeah, SuPHP for all.

I have 5.4, 5.5, 5.6, 7.0, and 7.1 enabled. 5.6 was default so a ton of people were using it. No one was using 5.5 or 7.0 at the time, so I switched all the 5.6 people to 5.5 temporarily. Today I noticed that 5.6 is still working, but 5.5 was apparently broken all along too, but since no one was using it I didn't see it in the logs. I'm about to delete that and reinstall it now. So bizarre that none of my other servers do this.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,250
463
Hello,

Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

Thank you.
 

Krydos

Well-Known Member
Jun 2, 2012
59
9
58
cPanel Access Level
Root Administrator
Could you open a support ticket using the link in my signature so we can take a closer look?
No offense intended, but no thank you. The last few times I've granted root access to any of our servers it has only resulted in more work for me cleaning things up. I'd be happy to help you figure out what is going on in any other way though.

For instance, it literally took me years to fix all the errors caused by granting root access to one of Invision Power Board's techs.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,250
463
I've been unable to reproduce this on a test system. Could you let us know the steps you are taking to reproduce the issue (including how you are running the PHP script that appears in the process list)?

Thank you.
 

Krydos

Well-Known Member
Jun 2, 2012
59
9
58
cPanel Access Level
Root Administrator
I haven't been able to reproduce it on any of my other servers either. I just did the usual process of setting up a new server. Installed CentOS minimal, and did yum update. Downloaded the cpanel install script to the fresh OS. Installed all of the PHP versions through EasyApache4. Just like I've done on all of my other servers. This one though got installed weird somehow. I'll let you know for sure if I figure out a way to reproduce it.
 
  • Like
Reactions: cPanelMichael