Jump to content
ranojit

Cron PHP Version Mismatch

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?

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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. 

Share this post


Link to post
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

Share this post


Link to post
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. 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
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.

Share this post


Link to post
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.


  • Similar Content

    • By JesusSuarz
      Hello,
      I'm trying to get some way to query if a user is online.
      I don't want to know the current user.
      if not something you can define for example $clientid or $userid or $emailclient ...
      I am making an external site. and i need to work with user sessions. (I am making a remote connection with the api).
      this function does not currently exist in the api available.
      I've been seeing this: https://developers.whmcs.com/advanced/authentication/
      however I do not see that it allows to define the user.
      I was also seeing this: https://docs.whmcs.com/Sessions
      I was able to save the cookie in the database, however I can't find any way to identify the one that belongs to each user.
      any idea how I can get (which users are online?) ..
      (please nothing to do with smarty, only php).

      postdata: forget to tell the method I use to get user authentication in my application.
      create the following code for my application:
      I first make a connection to the api: https://developers.whmcs.com/api/authentication/
      soon ValidateLogin: https://developers.whmcs.com/api-reference/validatelogin/
      soon GetClientsDetails: https://developers.whmcs.com/api-reference/getclientsdetails/
      soon CreateSsoToken: https://developers.whmcs.com/api-reference/createssotoken/
      // validar usuario $command = 'ValidateLogin'; $postData = array( 'email' => $email_user, //post 'password2' => $password_user, //post ); $api_login = localAPI($command, $postData); //var de id de usuario: $api_login["userid"]; // si se encuentra el user entonces traer detalles del usuario via email $clientid = array(); // array que tiene el id del cliente if ($api_login["userid"] == true) { $command = 'GetClientsDetails'; $postData = array( 'email' => $email_user, // email login ); $details_client = localAPI($command, $postData); $clientid[] = $details_client["client_id"]; } // variable del clientid es: $clientid[0]; // crear token de session $command = 'CreateSsoToken'; $postData = array( 'client_id' => $clientid[0], ); $results_ssotoken = localAPI($command, $postData); echo '<pre>'; var_dump($results_ssotoken); echo '</pre>'; this will create the url with (CreateSsoToken) where the user will be redirected for autologin, however the cookie is created only after entering the client area. that's why I don't know how to get the cookie, or identify the user.
       
      @brian! would you help me with this?
    • By JesusSuarz
      Hello
      I have a variable that is printed with {debug} in the tpl template.
      however I want to get the result in php of this variable.
      I need to get $customfields from a hook.
      how could you access $customfields that is printed inside a product
       
      @brian! could you help me?
    • By ModulesGarden
      1. Plesk Extended For WHMCS 3.5.0

      Because your system can never suffer from too many user-friendly features, today we are storming ahead with a solid update of Plesk Extended For WHMCS 3.5.0 that is about to nurture your web hosting business in more than a few different ways:
       
      Take maximum advantage of the newly introduced support for WHMCS V8.1 and "Twenty-One" theme. In order to limit the system resources consumed by PHP scripts, your clients are now allowed to use a custom PHP version and configurations per website. While in the comfy surroundings of the client area, let us also move a bit further to the new "Log Rotation" section where your customers can manage conditions for the log files to be cleaned up once they are too old or too big.
      Be sure to enjoy the full changelog available on our website!



      2. SMS Center For WHMCS 3.8.0

      Just as much deserving of a special mention is SMS Center For WHMCS, specifically because of its spanking-new 3.8.0 update!

      The module’s scope of support has been broadened to integrate well with as many as five all-new SMS gateways. Thanks to it, the official list of available SMS gateways now includes 51 providers in total!

      Additionally, the product has also received a series of tweak-ups so as to secure its rock-solid compatibility with both WHMCS V8.1 and "Twenty-One" system theme.

      Keep in touch with your customers no matter the time and place!



      3. Under the Microscope: MetricsCube Live Dashboard for WHMCS

      Reading through your business data feels as though you were reading a foreign language?

      Live Dashboard for WHMCS that forms a central part of MetricsCube communicates crucial metrics in a visual format to make all complex relationships in your data self-explanatory. Drop by the MetricsCube blog as soon as you can to get a close-up look at every single report and graph illustrating the real-time performance of your WHMCS business down to the last detail.

      Take an insightful stroll through the data-filled confines of Live Dashboard!



      Need Custom Software Development For Your Business?
       
      Get Your Free Quote Now! Specially for you we will adapt an application and its design to your own needs, create a new module or even a completely new system built from scratch!
    • By Xperikss1
      Hi,
      How do I make a registration in html (php) sending a request to WHMCS?
      Example:
      <form action="{$systemsslurl}dologin.php?goto=clientarea.php" method="post" name="frmlogin"> <label>Email address</label> <input type="email" name="username" placeholder="Your Email"> <label>Password</label> <input type="password" name="password"> <button type="submit">Login</button> </form> <a href="/pwreset.php" >Forgotten your Password? Click Here</a> But how do I implement this for registration?
      is it possible to do this?
    • By JesusSuarz
      sometimes the client can have 2 emails.
      one for your account details and one for the account owner.
      I need to know if the account owner's email is verified.
      The var: 
      $client = Menu::context("client"); gets the email that the customer has in the account details, however this is not the email owner of the account.
      I hope to make myself understood correctly.
       
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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