Cron php issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Akemi
    Junior Member
    • Feb 2023
    • 19

    Cron php issue

    Hi all,

    New to EspoCRM after trying out alot of CRM packages. Very happy about the installation process and documentation.

    I am stuck on a cron issue.

    I am hosting Espo on a Siteground site. On siteground i have setup cron with the following line:
    php /home/customer/www/mydomain.nl/public_html/cron.php

    It seems to be working but i get the cron error:
    Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.33. in /home/customer/www/mydomain.nl/public_html/vendor/composer/platform_check.php on line 24

    Seems clear no?
    Now if i check in espo admin/system it says 8.0.28.
    I have manually set the php version in siteground on 8.0.28

    Except the platform_check.php keeps claiming its still 7.4.33

    How is this possible?

    Thanks for your help in advance!
  • esforim
    Active Community Member
    • Jan 2020
    • 2204

    #2
    Hi there, from reading other post, I believe your CLI is using PHP 7.4 still.

    And CRON use CLI/Command Line Input/"Hacker typing".

    You can also try change to 8.1 then 8.0, or 8.0 to 7.4 then back to 8.0 to see if that somehow update or refresh it.

    Another thing you can try if you have control is to restart the PHP.

    Comment

    • emillod
      Active Community Member
      • Apr 2017
      • 1405

      #3
      As my colleague said, probably wrong version. You can log in into SSH and type php -v to check version. Many servers allow to use different version of PHP just by typing php before command in cron with specific version, for example php81 to use PHP 8.1.

      Comment

      • Akemi
        Junior Member
        • Feb 2023
        • 19

        #4
        Thanks guys for directing me in the right direction! With help from our hostingprovider the issue is resolved.

        They updated bash profile for me, which didn't resolve the problem. In the end the cron line should have been:

        php81 /home/customer/www/mydomain.nl/public_html/cron.php​

        And now no more errors.

        Comment

        Working...