I want to increase maximum execution time in php , not by changing php.ini
file.
I want to Increase it from my php file.
Is this possible?
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()
works in windows but not in linux.
Works in Linux (php-5.2.10-1.el5.centos.rpm)
This change only applies for the current running script? Or does the new maximum limit persists?
according to here: php.net/manual/en/function.ini-set.php, "The configuration option will keep this new value during the script's execution, and will be restored at the script's ending"
it should be noted that the web server also has timeout directive like Apaches TimeOut this is quoted from here " Your web server can have other timeout configurations that may also interrupt PHP execution. Apache has a Timeout directive and IIS has a CGI timeout function. Both default to 300 seconds. See your web server documentation for specific details. "