0 votes
in PHP by
How can we increase execution time of a PHP script in PHP?

1 Answer

0 votes
by

By default, the maximum execution time for PHP scripts is set to 30 seconds. If a script takes more than 30 seconds, PHP stops the script and returns an error.

You can change the script run time by changing the max_execution_time directive in the php.ini file.

When a script is called, set_time_limit function restarts the timeout counter from zero. It means, if default timer is set to 30 sec, and 20 sec is specified in function set_time_limit(), then script will run for 45 seconds. If 0sec is specified in this function, script takes unlimited time.

Related questions

0 votes
asked Jun 22, 2019 in PHP by SakshiSharma
0 votes
asked Jun 6, 2020 in PHP by Robindeniel
...