Jump to content

Cron PHP Version Mismatch


ranojit
Go to solution Solved by ranojit,

Recommended Posts

I have change php version 7.3 to 7.4 from cPanel. I also edit cron job command and change 

opt/alt/php73/usr/bin/php -q /*****/****/****/crons/cron.php

to 

opt/alt/php74/usr/bin/php -q /*****/****/****/crons/cron.php

 

but I got error on system health check page on my WHMCS.

 

Quote

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

How can I solve this issue?

Link to comment
Share on other sites

  • 4 months later...
8 minutes ago, steven99 said:

In the cron make user to use the full path to the php binary as mentioned above and then in cpanel ensure the version selected is the one the cron is using. 

Friend, I use Plesk on Ubuntu. When I go to create a cron I already have the following (attached image), what should I do?

 

foro.png

Link to comment
Share on other sites

2 minutes ago, steven99 said:

In plesk , go to PHP Settings -> and select 7.4 as the version also.   Or if you have cloudlinux installed and the PHP selector, you may need to select it there instead. 

I already have it like this, look at the screenshot that I am attaching. I also entered by root and I see that the server is running PHP 7.4, I don't know what else to do

foro2.png

foro3.png

Link to comment
Share on other sites

In the WHMCS install folder, put in a php file (named anything.php) with just:

<?php

phpinfo();

?>

That should provide the correct PHP version.  If that also says 7.3, then something is up within Plesk and resetting the version, switching to a lower version and then back to 7.4, may help.   You can also get that in whmcs but considering whmcs is reporting something the wrong version, confirming out of whmcs would be a good idea. 

Link to comment
Share on other sites

12 minutes ago, steven99 said:

In the WHMCS install folder, put in a php file (named anything.php) with just:


<?php

phpinfo();

?>

That should provide the correct PHP version.  If that also says 7.3, then something is up within Plesk and resetting the version, switching to a lower version and then back to 7.4, may help.   You can also get that in whmcs but considering whmcs is reporting something the wrong version, confirming out of whmcs would be a good idea. 

 

Hello, thank you very much for all your help. I already did those procedures. WHMCS is running under PHP 7.4.16 and in Plesk, Cron is running under PHP 7.4.16 in the same way. I totally disabled PHP 7.3 from Plesk Onyx, so this doesn't cause any problems but I keep getting the error in WHMCS anyway. I am attaching a screenshot of this error. I'm close to launching my platform and I don't want that to cause problems for me in the future.

error.png

Link to comment
Share on other sites

2 minutes ago, steven99 said:

If you made those changes within the last 24 hours, I think it may take until the next daily cron for that to go away.  Or do you have other crons setup for WHMCS that are set to 7.3 still?

Ahh ok, then I must wait. The adjustment was made at 1:00 a.m., and the cron should run at midnight. I will wait, I hope this is it. Your help has been very valuable to me. Greetings from Costa Rica.

Link to comment
Share on other sites

  • 3 months later...
  • 8 months later...

@ranojit it's two years later but I'm having this problem after recently "upgrading" to Cloudlinux and look what I discovered ...

$ ll /usr/local/bin/ea-php74
lrwxrwxrwx 1 root root 37 Mar 16 10:51 /usr/local/bin/ea-php74 -> /opt/cpanel/ea-php74/root/usr/bin/php

$ /opt/cpanel/ea-php74/root/usr/bin/php -v
PHP 7.3.33 (cli) (built: Mar  6 2022 18:26:22) ( NTS )

For clarity ...

$ /opt/cpanel/ea-php74/root/usr/bin/php -v
PHP 7.3.33 (cli) (built: Mar  6 2022 18:26:22) ( NTS )

Oh dear. LOL sigh

Link to comment
Share on other sites

  • 7 months later...
  • 9 months later...
On 11/15/2022 at 9:11 PM, ranojit said:

I'm using CyberPanel now. After updating CyberPanel I got the same issue again. I tried everything. But the issue not solved. Then I wait for the next daily task cron job. And I found next day the issue has been solved!

I'm using CyberPanel now. After updating CyberPanel I got the same issue again. I tried everything. But the issue not solved. Then I wait for the next daily task cron job. And I found next day the issue has been solved!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated