Piotr W.

Registered
Oct 6, 2016
2
0
1
Poland
cPanel Access Level
Root Administrator
After recent WHM update (WHM 58.0 (build 31) - CENTOS 7.2 x86_64) my cron jobs for users accounts started to output headers like this:

Set-Cookie: PHPSESSID=[some_data]; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html; charset=UTF-8

Scripts are doing their jobs but additional output generates tones of emails...

Running task from console - no headers.
Running task from cron job with same command (php some/path.php) - headers as shown above.

Any ideas?
 

Piotr W.

Registered
Oct 6, 2016
2
0
1
Poland
cPanel Access Level
Root Administrator
Thank you for your reply.

No, I'm using EasyApache 4 from the beginning of my server (recent build) - EA4 was in beta then. It all worked fine until recent WHM autoupdate.

I've tried things from given article:

/usr/bin/php - did not work
/usr/local/bin/php - works good now

The question is - what changed? Before update simple 'php' worked fine. When I'm checking version of php (php --version) it shows the same version as /usr/bin/php, /usr/local/bin/php

Is there a way to globally fix this? Some binding maybe? I have 50+ cron jobs, it would be huge pain to edit those one by one in cpanel.
 

cPanelMichael

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

Could you let us know which path you are using for PHP in the additional cron jobs? For instance, are they all configured to use "/usr/bin/php" instead of "/usr/local/bin/php"? If so, this command would update all instances of "/usr/bin/php" to "/usr/local/bin/php" in the cron jobs for all of your users:

Code:
cp -a /var/spool/cron /var/spool/cron-backup
replace "/usr/bin/php" "/usr/local/bin/php" -- /var/spool/cron/*
Thank you.