Cronjob Error with php version

2 posts / 0 new
Last post
#1 Thu, 08/29/2019 - 13:15
Falcons34

Cronjob Error with php version

So I am getting cronjob errors about my WHMCS installation, here it i:

PHP Fatal error: The file /home/domain/public_html/accounts/crons/cron.php cannot be run by the ionCube Loader. Please ask the script provider to supply an encoded file that can run on your version of PHP, 5.4. in Unknown on line 0

The problem? I am not running php5.4, I am running 7.2 phpinfo at the root domain, as well as the diagnostic file from WHMCS both state i am using php7.2 so what gives?

Thu, 08/29/2019 - 14:12
andreychek

Howdy,

Your website itself may be using that particular PHP version, that's because Apache has been configured to use it when processing any .php files.

However, cron may not be going through Apache, it's likely calling the PHP binary directly.

What you'd need to do is ensure the cron job is using the proper PHP binary. That is, rather than something like /usr/bin/php", which is your PHP 5.4, you'd have to find the path to the PHP 7.2 binary and use that instead.

-Eric