How to increase the execution time of a PHP script ?

Member

by adolf , in category: Technology , 3 years ago

How to increase the execution time of a PHP script ?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by tyrel_franecki , 3 years ago

The default max execution time for PHP scripts is set to 30 seconds. If a php script runs longer than 30 seconds then PHP stops the script and reports an error.

You can increase the execution time by changing max_execution_time directive in your php.ini file or calling ini_set(‘max_execution_time’, 300); //300 seconds = 5 minutes function at the top of your php script.