1.

How to increase the maximum execution time of a script in PHP?

Answer»

There are two ways to increase the maximum EXECUTION time of a script in PHP AVAILABLE as following.

Method 1: Update php.ini file

To complete this process, we have to OPEN the php.ini file and rearrange the max_execution_time (in SECONDS) as per our DESIRED time.

Syntax

max_execution_time = 180 //180 seconds = 3 minutes

Method 2: Update .htaccess file

php_value max_execution_time 300

Method 3: Update your .php file

Here, we have to place the below-mentioned syntax on top of the PHP script.

ini_set('max_execution_time', 300);
ini_set('max_execution_time', 0);



Discussion

No Comment Found