typo in function caused site to go down

typo in function caused site to go down

by Barbara Taylor -
Number of replies: 8

Hello,

Does anyone know what would cause this error?  It took down our site for 4 hours. Notice the typo, "eate_default_timezone_set()" instead of "date"


Default exception handler: Exception - Call to undefined function eate_default_timezone_set() Debug: \n Error code: generalexceptionmessage\n* line 196 of /lib/classes/date.php: Error thrown\n* line 718 of /lib/setup.php: call to core_date::set_default_server_timezone()\n* line 42 of /config.php: call to require_once()\n* line 31 of /mod/quiz/processattempt.php: call to require_once()\n


Is there an easy way to find the code issue?  Is it a Moodle issue?  A Moodle plugin issue?  A PHP issue?

Thanks,

Barbara


Average of ratings: -
In reply to Barbara Taylor

Re: typo in function caused site to go down

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

Which (exact as you can) version of Moodle is this?

I had a look at that file (lib/classes/date.php) back through a few versions (it's relatively new anyway) and there was no typo.

Presumably you've had a look at line 196 of lib/classes/date.php to see what's there? And...?

In reply to Howard Miller

Re: typo in function caused site to go down

by Barbara Taylor -

Hi Howard,

Sorry I didn't include that to begin with.  We are on 3.4.4 build 20180709.  We are running PHP version 7.1.20 Our server admin looked through the code and didn't see the misspelling anywhere in those files listed.  I could ask him to tell me what line 196 says if that would help.

Thanks,

Barbara

In reply to Barbara Taylor

Re: typo in function caused site to go down

by Mary Cooch (personal account) -
Picture of Documentation writers Picture of Testers

I am in no way technical, so please do not rely on me, but there is a PHP bug going around whereby a letter in  your code is randomly replaced by another letter, and it breaks your site. I am just mentioning it in case that might be the case with you. https://bugs.php.net/bug.php?id=72112 And also https://bugs.php.net/bug.php?id=71135

Average of ratings: Useful (1)
In reply to Mary Cooch (personal account)

Re: typo in function caused site to go down

by Matteo Scaramuccia -

For Community ref: MDLSITE-5251.

It happens even here in Moodle.org: following the Moodle issue above would be useful for those affected too.

HTH,
Matteo

Average of ratings: Useful (1)
In reply to Matteo Scaramuccia

Re: typo in function caused site to go down

by Barbara Taylor -

Thanks Mary and Matteo.  I don't know anything about PHP but will be sharing these links with our team.  We recently upgraded to PHP 7.1.20.  Thank you all for being so helpful.

Barbara

In reply to Barbara Taylor

Re: typo in function caused site to go down

by Alex Rowe -

Hi Barbara, are you able to check with your team what the value is for the PHP setting "opcache.file_cache"?

In reply to Matteo Scaramuccia

Re: typo in function caused site to go down

by Arto Nieminen -
Picture of Core developers Picture of Plugin developers Picture of Testers

Hi,

We are (probably) having the same issue with opcache. Additionally, there's a lot of segmentation faults in Apache error log. The errors are gone after disabling opcache.

So the problem seems to be fixed in Moodle.org, and you have opcache enabled? Can you give any details about what has been changed?

In reply to Arto Nieminen

Re: typo in function caused site to go down

by Jari Vilkman -

Hi,

We are (probably) having the same issue with opcache. Additionally, there's a lot of segmentation faults in Apache error log. The errors are gone after disabling opcache.

So the problem seems to be fixed in Moodle.org, and you have opcache enabled? Can you give any details about what has been changed?