Cron Version Mismatch + Nginx Issues

Bashed

Well-Known Member
Dec 18, 2013
146
4
68
cPanel Access Level
Root Administrator
Upgraded to WHMCS 8.0.1 and changed PHP to 7.4 (cpanel).

Now, health check shows:

Cron PHP Version Mismatch
Your environment appears to be running a different PHP version (7.3.22) for the System Cron than the currently loaded PHP version (7.4.10). This may cause issues running your System Cron.

Code:
[root@server ~]# php -i | grep "Loaded Configuration File"
Loaded Configuration File => /opt/cpanel/ea-php73/root/etc/php.ini
When enabled Nginx in EA4 too, all sites go down despite that experimental repository is installed, nginx installed and PHP-FPM enabled. Using Cloudflare on the sites too.
 

cPanelJamesW

Linux Technical Analyst I
Staff member
Mar 13, 2018
24
1
78
Houston
cPanel Access Level
Root Administrator
Greetings,

The PHP Version Mismatch indicates your cron may be using "php /path/to/file.php" as the format rather than specifying the PHP binary path itself, if you would like to use PHP73 while remaining on PHP74 as the global version, you can correct this by specifying the binary path to PHP similar to this:
Code:
/opt/cpanel/ea-php73/root/usr/bin/php /path/to/file.php
In regard to Nginx, what error(s) are seen when this is enabled?

Does the Nginx service successfully start after this has been enabled?

Are there any errors logged for the service at - /var/log/nginx?

Thanks!
 

dreamlabnetwork

Registered
Oct 14, 2021
1
0
1
USA
cPanel Access Level
Root Administrator
The PHP Version Mismatch indicates your cron may be using "php /path/to/file.php" as the format rather than specifying the PHP binary path itself, if you would like to use PHP73 while remaining on PHP74 as the global version, you can correct this by specifying the binary path to PHP similar to this:


/opt/cpanel/ea-php73/root/usr/bin/php /path/to/file.php
I am having the same issue after updating WHMCS. But what we use is CloudLinux. Can you provide the command that would need to be used if the user is on CloudLinux 7.4 and need to run a cron job under that version?