How to set infinite execution time in a PHP script

October 26, 2018

Add the following code to set unlimited execution time for a PHP script:


You can also update max_execution_time in php.ini

If the value is 0, it is actually unlimited. Otherwise it is that number of seconds.