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);

Suggest An Answer

No suggestions Available!