Home
» Other Stuff » PHP change max execution time
PHP change max execution time
| March 30, 2009 | Posted by The Futtock under Other Stuff |
Having trouble with your PHP scripts timing out? You need to change the max execution time. Try one or both of the following:
ini_set(“max_execution_time”, 60); // Set to 60 seconds
set_time_limit(60); // Set to 60 seconds
For no time limit try:
set_time_limit(0); // No time limit
You might still run into problems of your server is running PHP in safe mode. Also your server will have a timout that might need to be changed.
If you have access to php.ini then try changing max_execution_time to a higher value. This will however effect all your PHP scripts.
Recent Comments