This topic contains 1 reply, has 2 voices, and was last updated by  Mark Brown 2 years ago.

  • Author
  • #1378
    Sebastian Fragale Sebastian Fragale 

    Every once in a while I need to process a HUGE file. Though PHP probably isn’t the most efficient way of processing the file, I’ll usually use PHP because it makes coding the processing script much faster. To prevent the script from timing out, I need to increase the execution time of the specific processing script. Here’s how I do it.

  • #1379
     Mark Brown 

    The best way I find is to do it via .htaccess – Using the max_execution_time directive

    By default, the maximum execution time for PHP scripts is set to 30 seconds (or you can open a support ticket and we will update it for you). If a script runs for longer than 30 seconds, PHP stops the script and reports an error. You can control the amount of time PHP allows scripts to run by changing the max_execution_time directive in an .htaccess file.

    To change the maximum execution time for your PHP scripts, follow these steps:

    – Log in to your account using FTP.
    – Use a text editor to add the following line to the .htaccess file. Replace 30 with the maximum execution time value that you want to set, in seconds:

    php_value max_execution_time 30

    – Save the changes to the .htaccess file and exit the text editor.
    -To verify that the new setting is active, create a PHP test file that contains the following code in the same directory where the .htaccess file is located:

    <?php phpinfo(); ?>

    Load the test file in your web browser, and then search for the name of the directive. The Local Value column should display the new setting that you specified in the .htaccess file.

You must be logged in to reply to this topic.


We're not around right now. But you can send us an email and we'll get back to you, asap.

TD Web Services



Log in with your credentials


Forgot your details?


Create Account