Skip to main content

Crons Suddenly Can't include PHP files

Answered

Comments

15 comments

  • cPRex Jurassic Moderator

    Hey there!  Can you let me know the exact line of code that you have inside the crontab?  That's likely the best place to start.

    0
  • HappyFeat

    There are about 30 of them, but the format is -

    /usr/bin/php /home/xxx/public_html/xxx/xxx.php >/dev/null 2>&1

    0
  • cPRex Jurassic Moderator

    That's likely the issue - you may need to call the specific PHP version for the account using this path instead, adjusting this for your specific PHP version:

    /opt/cpanel/ea-php##/root/usr/bin/php

    0
  • HappyFeat

    Thanks, I'll give that a go

    1
  • cPRex Jurassic Moderator

    Let me know what you find!

    0
  • HappyFeat

    That seems to have done the trick. Thank you.

    But what I don't understand is why would it suddenly be the case that I have to use that path? We've been using the same version of PHP for nearly a year now.

    0
  • cPRex Jurassic Moderator

    Did you server possibly make an update, or are you using MultIPHP with CloudLinux?  I don't have a great explanation for why the sudden change may have happened as I'd really just be guessing.

    0
  • HappyFeat

    Maybe there was an update, we don't use CloudLinux.

    0
  • cPRex Jurassic Moderator

    If you'd like to create a ticket we could take a more in-depth look at the system, as I wouldn't expect any update to change how this was handled.  I also don't have any other reports of a similar issue today (and my own PHP crons are working normally)

    0
  • HappyFeat

    We have to do a complete re-build soon due the Centos EOL. So it's not worth pursuing at this point.

    1
  • HappyFeat

    We have a new server that's just a few months old and this has happened again. It seems to have occurred when I ran a manual update last week.

    We're still using the path /opt/cpanel/ea-php83/root/usr/bin/php in the cron job and this is still valid but I notice the last updated date of opt/cpanel/ea-php83/root/usr/bin/php is Oct 31 04:39 which would have been when the last update occurred.

    0
  • HappyFeat

    Ever since the last update something weird has happened when PHP is run from the command line that is different from when PHP runs normally.

    0
  • HappyFeat

    Support Ticket 95394135

    0
  • cPRex Jurassic Moderator

    Thanks for submitting that ticket - it turns out that user was using jailshell and didn't have access to the directory the cron was running from, but we were able to get that resolved for you!

    0
  • HappyFeat

    Yes. Thank you.

    I've made a note of that for the future.

    0

Please sign in to leave a comment.