### Fatal Error - New Install

Fatal Error - New Install

Hi all,  Fresh install on win7.  I get this error:

Fatal error:  Maximum execution time of 300 seconds exceeded in D:\Moodle\MoodleWindowsInstaller-latest-25\server\moodle\lib\dml\mysqli_native_moodle_database.php on line 1087

I have googled the problem and adjusted the php.ini time value - still not working.

Any help greatly appreciated.

Rob

Average of ratings: -
Re: Fatal Error - New Install

Hi Rob,

How much did you increase it? Sometimes installations can take quite a while.

Average of ratings: -
Re: Fatal Error - New Install

I first tried 160, then 300, then finally 600.  With reboots in between.

Rob

Average of ratings: -
Re: Fatal Error - New Install

I first tried 160, then 300, then finally 600.  With reboots in between.

Rob

Average of ratings: -
Re: Fatal Error - New Install

IIS or Apache?

If it's IIS then, assuming you're running PHP as a FastCGI module, increase the "ActivityTimeout" in your \WINDOWS\system32\inetsrv\fcgiext.ini file to the same value as what you've specified for "max_execution_time" in your php.ini file.

Average of ratings: -
Re: Fatal Error - New Install

I go to the inetsrv folder and it is empty.

Rob

Average of ratings: -
Re: Fatal Error - New Install

Windows 7? If so, then it could be a different path - I don't have a Windows 7 machine handy to check. So, search your whole drive for fcgiext.ini.

But since you used the XAMPP package then you're running Apache, so FastCGI doesn't apply... That's probably why the inetsrv folder is empty (if it exists at all).

So, your problem is probably something in the php.ini file - unless XAMPP has some other setting in it somewhere that overrides the max_execution_time and max_input_time settings in php.ini. I don't use Xampp (it's more trouble than it's worth...) so I can't confirm that.

Which settings in PHP did you modify when you tried to correct this? What values do you have for max_execution_time and max_input_time?

And do you HAVE TO use Xampp???

Average of ratings: -
Re: Fatal Error - New Install

I have the same error on Windows 7 with XAMPP when I try a new installation of Moodle 2.5.2.

Changing max_execution_time in php.ini has no effect.
The fatal error message tells that:

maximum execution time of 300 seconds exceeded in \moodle\lib\dml\mysqli_native_moodle_database.php on line 539

all the time despite of the max_execution_time value in php.ini.

Average of ratings: -
Re: Fatal Error - New Install

If you can get into Moodle at all, check under Site Administration > Server > PHP Info specifically for "Loaded Configuration File" which will tell you where to change the php maximum execution time.

If you can't get into Moodle at all, create an info.php in your wwwroot with the following:

<?php
phpinfo();
?>

If the php.ini value is high enough, then perhaps you're being caught by the Apache timeout instead. Find your httpd.conf and adjust or add a "TimeOut" setting to increase the execution time allowed by Apache. Default here is 300 seconds (5 minutes), which is already pretty long. Still, if you're on a slow computer and need it...

TimeOut 600

Or whatever is long enough for it to work.

Average of ratings: -
Re: Fatal Error - New Install

max_execution_time = 30 in php.ini

phpinfo() shows this value, but the error message is:

Maximum execution time of 300 seconds exceeded

I tried to set TimeOut 600 in httpd.conf, but the error message is the same again.

I suppose this value of 300 is set during the run time by the installation scripts and must be changed somewhere in Moodle code.

Average of ratings: -
Re: Fatal Error - New Install

Do you have a config-inc.php file under .\xampp\phpMyAdmin?

If so, look for this line and adjust as required:
$cfg['ExecTimeLimit'] = 300; Average of ratings: - Re: Fatal Error - New Install I found max_execution_time set to 300 in /lib/upgradelib.php function upgrade_set_timeout($max_execution_time=300)

I changed this to

and with TimeOut 600 in httpd.conf

the installation continues without error message, but it is very slow, 15 minutes and I am still waiting to finish...

The XAMPP version is 1.8.3 PHP 5.5 30/8/2013.

Average of ratings: -
Re: Fatal Error - New Install

You need to set max_execution_time in php.config to at least 600

I think but can't find the wiki entry in docs.moodle.org on the subject

when you make changes to the php config don't forget to restart the web server.

Average of ratings: -
Re: Fatal Error - New Install

Average of ratings: -
Re: Fatal Error - New Install

Hi Vanyo,

You should modify the code. Search for the PHP configuration file, php.ini. Open it and search for the following directives:

max_execution_timesome-value-in-seconds
max_input_time = some-value-in-seconds

Average of ratings: -