Wednesday, April 22, 2009

Workaround for Maximum Script Execution time limit

We all know that the default execution time of a php script is set to 30 seconds, defined by the parameter max_execution_time in php.ini file.

A simple workaround to overcome the time limitation is a call to ini_set() as :

ini_set('max_execution_time','0')   //0 = no limit


This causes the current script to be executed without any maximum time limit. I found this workaround helpful in case of sending newsletters where bulk mailing is required. Hope it is helpful to you.

Creative Commons License

No comments:

Post a Comment