Unable to run cron.php

Unable to run cron.php

by SCE Moodle Admin -
Number of replies: 1
Hi,
Cron job has been set up in Webmin.  However, the following error is got.

PHP:  syntax error, unexpected '(' in /var/www/html/moodle/admin/cli/cron.php on line 8

This happens even when the same is run in putty.
The site uses the stock cron.php file that comes with no modification done.  This is flabergasting.
Any help is appreciated.
PHP 7.1 is used on Ubuntu 14.04LTS.  The version of Moodle is Moodle 3.1.1+ (Build: 20160714)
Thanks in advance.
JSP


Average of ratings: -
In reply to SCE Moodle Admin

Re: Unable to run cron.php

by Ken Task -
Picture of Particularly helpful Moodlers

In a 3.1.1+ (Build: 20160714)
line 8 of admin/cli/cron.php is a comment in the header of the file.

That line says:
// (at your option) any later version.

Since you are running the cron via Webmin (which is perl based) have you updated your webmin to it's highest/most secure version?

And ... what does the cron job entry look like in Webmin (assuming scheduled cron jobs)? [without the password, of course but do check the password for any () characters in it]?

'spirit of sharing', Ken