Cron stopped working on php version update!

I set up a cron on November 2016 and all has been running fine.

However, In the last few days the cron has stopped working and after contacting my hosting company I discovered that they’ve updated the php version on the server to 5.6.31. They then suggested using the Multiphp Manager to change the php version for my individual hosting package back to "ea-php54. That didn’t get the cron working again either & so I’ve kept it at 5.6.31. They then suggested that the cron’s command line may need editing to work on the updated php version, implying that some aspect of the command line may have been deprecated in the new version.

So . . . Would anybody be able to help me edit the cron’s command line for the new version of php:

The 2 command lines I’ve been using are:

PROCESS QUEUE

php-cli /data04/future/public_html/lists2/admin/index.php -c /data04/future/public_html/lists2/config/config.php -p processqueue >~/processqueue.log 2>&1

PROCESS BOUNCES

php-cli /data04/future/public_html/lists2/admin/index.php -c /data04/future/public_html/lists2/config/config.php -p processbounces >~/processbounces.log 2>&1

Also the log file for the cron reads as follows:

/usr/local/cpanel/bin/jailshell: php-cli: command not found

But the cron has been working fine until the hosting company updated the server’s php version

FYI
phplist version: v3.2.5
Apache Version: 2.4.27
MySQL Version: 5.5.54-cll
Perl Version: 5.8.8

I’d very much appreciate any help on this issue

Many thanks

Phil

you might want to setup the cron so that it sends a report to you every time you run it.
The email you receive will notify you of any errors, which would be helpful when troubleshooting.

Edit the cron job in your cpanel to send the status report to your email address.

If you’re seeing the error listed above, then obviously your cron job will not execute because php-cli is not available or not enabled. With my current hosting provider, php-cli is enabled by default. With a previous provider, I had to request php-cli to be enabled. Sounds like your hosting provider did an upgrade and failed to enable php-cli.

With a previous provider, I had to prefix the command with a location as in “php56/php-cli”. I doubt this is a requirement, but it was in the past for me.

If you let support personnel at your hosting provider know of the error message, they should be able to assist you. If they can’t, then you probably need a new hosting provider.

Thanks guys

SteveS - you were right when you said about prefixing the command line a location. The guy at the hosting company inserted the text below at the front of the cron and it now seems to be working (according to the log file anyway).

/opt/cpanel/ea-php56/root/usr/bin/php

Thanks also to danwaterloo for your suggestion