Is it possible to extend the execution time of a php script?
Answers (1)
Add AnswerYes, It’s possible to extend a PHP script execution time.
Set max_execution_time globally in php.ini
Open the php.ini file and change the max_execution_time value to the desired duration (in seconds).
max_execution_time=120 //120 seconds = 2 minutes
Increase the execution time of the PHP script.
ini_set( ‘max_execution_time’, ‘300’ ); //300 seconds = 5 minute
To make the execution infinite try the following code:
ini_set( ‘max_execution_time’, ‘0 ‘ ); //0 = NOLIMIT