Fatal error: Maximum execution time of 120 seconds exceeded in C:\moodle\lib\filestorage\zip_archive.php on line 218

Fatal error: Maximum execution time of 120 seconds exceeded in C:\moodle\lib\filestorage\zip_archive.php on line 218

by Stephen Bloomer -
Number of replies: 3

I am trying to spend some time cleaning up the backups and going through those that fail on automated backup.  This one course is getting about 95% through the backup and failing with

Fatal error: Maximum execution time of 120 seconds exceeded in C:\moodle\lib\filestorage\zip_archive.php on line 218

Now my PHP file has a maximum run time of 300 seconds, so its not that.  When I go to the files as detailed in the error it says nothing to do with execution time. 

        $res = $this->za->close();

Any ideas?

Server

Front - Windows 2008 R2, IIS, PHP 5.5.11

Back - Windows 2008 R2, MySQL 5.6.19

Average of ratings: -
In reply to Stephen Bloomer

Re: Fatal error: Maximum execution time of 120 seconds exceeded in C:\moodle\lib\filestorage\zip_archive.php on line 218

by Guillermo Madero -

Hello Stephen,

The "Maximum execution time of 120 seconds exceeded" error message is definitely a server issue and that's why the script is timing out.

1. The PHP php.ini configuration file should have a line like:

max_execution_time = 300

2. You should make sure that you modified the actual, referenced php.ini file and not another. Within Moodle (Administration > Server > PHP info) you can check about the configuration file loaded; look for the following two lines:

Configuration File (php.ini) Path
Loaded Configuration File

3. Check that there isn't a .htaccess (dot htaccess) file in the Moodle directory. Maybe there is one with the following line:

php_value max_execution_time 120

Sorry, never mind about the last point; you are using IIS, not Apache. Please then see:

http://blogs.iis.net/donraman/archive/2010/02/08/troubleshoot-my-php-script-is-timing-out.aspx

http://www.iis.net/learn/application-frameworks/install-and-configure-php-on-iis/using-php-manager-for-iis-to-setup-and-configure-php

http://forums.iis.net/default.aspx/41?IIS+7+and+Above

In reply to Guillermo Madero

Re: Fatal error: Maximum execution time of 120 seconds exceeded in C:\moodle\lib\filestorage\zip_archive.php on line 218

by Stephen Bloomer -

Thanks for that.  i will go over the links over the next couple of days