Increase PHP Script Execution Time Limit

Every once in a while we need to process a HUGE file. Though PHP probably isn’t the most efficient way of processing the file, we usually use PHP because it makes coding the processing script much faster. To prevent the script from timing out, I need to increase the execution time of the specific processing script.

How to fix

     //300 seconds = 5 minutes
     ini_set('max_execution_time', 300);

Place this at the top of your PHP script.

Permanent link to this article:

Leave a Reply

Your email address will not be published.