Fatal Error: Maximum Execution Time of 300 Seconds Exceeded

Fatal error: Maximum execution time of 300 seconds exceeded

At the beginning of your script you can add.

ini_set('MAX_EXECUTION_TIME', '-1');

Maximum execution time of 300 seconds in Xampp on Windows

Change Maximum Execution Time

php.ini

max_execution_time = 30

From Code

Start your code with,

ini_set('MAX_EXECUTION_TIME', 3600);

.htaccess

php_value max_execution_time 3600

No matter which option you choose, restart Apache service.

Fatal error: Maximum execution time of 30 seconds exceeded. How to handle this error?

You can either increase the maximum execution time by using set_time_limit() or by setting max_execution_time in the php.ini.
Also by setting set_time_limit to 0 you can remove the limit for exceution time.

And if you are using linux you can try with the function register_shutdown_function.This function will be called when the execution time limit is reached.

Maximum execution time of 300 seconds exceeded

 ini_set('max_execution_time', 0). 

Don't use all caps (in general for ini settings) and use 0 not -1 when setting value to no limit.

http://php.net/manual/en/info.configuration.php#ini.max-execution-time

Maximum execution time exceeded in required script file

I had to set the max execution time limit in the function library files that the ajax call was posting to.



Related Topics



Leave a reply



Submit