[3.8] - Syntax error from error_log (Admin/cli)

[3.8] - Syntax error from error_log (Admin/cli)

by Thomas Renard -
Number of replies: 4

Hi,

I keep on getting this error in error_log (Admin/cli), even when not being logged in as Admin:

PHP Parse error:  syntax error, unexpected ':', expecting ';' or '{' in /home/mywebsite/public_html/moodle/lib/classes/component.php on line 1096
What to do?
Also, can this be the reason why I get this error when trying to load my page?:

"
Service Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.

"

Thanks for your advice!

Best regards,

Thomas

Average of ratings: -
In reply to Thomas Renard

Re: [3.8] - Syntax error from error_log (Admin/cli)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You have the wrong version of PHP (too old). Check the requirements for 3.8

https://docs.moodle.org/dev/Moodle_3.8_release_notes#Server_requirements

...and possibly but let's fix the easy/obvious issue first
In reply to Howard Miller

Re: [3.8] - Syntax error from error_log (Admin/cli)

by Thomas Renard -
Right, I changed PHP to the latest version but the errors in error_log keep coming.

I also noticed that it looks like this error appears every exact hour. Could this be something to do with a cronjob?

Any idea?

Thanks for your help!

Thomas
In reply to Thomas Renard

Re: [3.8] - Syntax error from error_log (Admin/cli)

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Just a reminder that the PHP CLI version and the CGI module for Apache are unconnected. They could have different versions.
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: [3.8] - Syntax error from error_log (Admin/cli)

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
^^ This

Make sure you check that BOTH the cli and the Apache module are the correct version. Don't assume they are...
Average of ratings: Useful (1)