Moodle 2.1 or later requires at least PHP 5.3.2

  • updated
  • Answered

I keep getting a cron error regarding my moodle 2.4 installation even though I update the PHP version via c-panel. I get an email every hour since I installed moodle.


The subject line reads " /usr/local/cpanel/3rdparty/bin/php -q /home/n*****12/public_html/moodle/admin/cli/cron.php


The actual error reads "Moodle 2.1 or later requires at least PHP 5.3.2 (currently using version 5.2.6). Some servers may have multiple PHP versions installed, are you using the correct executable?"


I need help.

Scott
Hello Sid12, When you set the php version in the cpanel, this does not apply to the crons. The cron will use the default php for the server, which is the 5.2.6. You can, however, have the Cron use the newer php, you simply have to change the way it is calling the php. For your situation, change
/usr/local/cpanel/3rdparty/php -q
to
/opt/php54/bin/php -q -c
This allows the cron to call the php switch that will run the moodle. You will want to do that for both crons and they should then run fine. Best Regards, Scott M