How to Increase the Execution Timeout in PHP

How to increase maximum execution time in php

ini_set('max_execution_time', '300'); //300 seconds = 5 minutes
ini_set('max_execution_time', '0'); // for infinite time of execution

Place this at the top of your PHP script and let your script loose!

Taken from Increase PHP Script Execution Time Limit Using ini_set()

How to increase the execution timeout in php?

You need to change some settings in your php.ini:

upload_max_filesize = 2M 
;or whatever size you want

max_execution_time = 60
; also, higher if you must - sets the maximum time in seconds

Where your PHP.ini is located depends on your system environment. For more information: http://php.net/manual/en/ini.list.php

Set maximum execution time in PHP

You can use 0 :

max_execution_time = 0     

That will disabled the limitation. Don't forget to restart apache after.

You can also user the PHP version :

<?php set_time_limit(0); ?>

Increase the maximum execution time in php in godaddy web hosting

In .htaccess

<IfModule mod_php5.c>
php_value max_execution_time 5000
</IfModule>

OR place this at the top of your PHP script

ini_set('max_execution_time', 5000);


Related Topics



Leave a reply



Submit