PHP Script - How can we increase the execution time of a php script?

How can we increase the execution time of a php script?

Default time allowed for the PHP scripts to execute is 30s defined in the php.ini file. The function used is set_time_limit(int seconds). If the value passed is ‘0’, it takes unlimited time. It should be noted that if the default timer is set to 30 sec and 20 sec is specified in set_time_limit(), the script will run for 45 secs.

How can we increase the execution time of a php script?

By default the PHP script takes 30secs to execute. This time is set in the php.ini file. This time can be increased by modifying the max_execution_time in seconds. The time must be changed keeping the environment of the server. This is because modifying the execution time will affect all the sites hosted by the server.

How can we increase the execution time of a php script?

The script execution time can be increased by
- Using sleep() function in PHP script
- Using set_time_limit() function
- The default limit is 30 seconds. The time limit can be set to zero to impose no time limit to pause.
PHP - What is Type juggle in php?
PHP - Type Juggling means dealing with a variable type. In PHP a variables type.......
PHP - What is the difference between mysql_fetch_object and mysql_fetch_array?
PHP - Mysql_fetch_object returns the result from the database as objects while....
PHP - What is Joomla in PHP?
Joomla is an open source content management system.....
Post your comment