2

I want to change the max_execution_time in the .htaccess file. I tried it in this way: <IfModule mod_php5.c> php_value max_execution_time 300 </IfModule> but then I got a 500 internal server error. My .htaccess file also includes this:

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Send would-be 404 requests to Craft
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
    RewriteRule (.+) index.php?p=$1 [QSA,L]
</IfModule>

Any idea why I got this error? Or how I can change the max_execution_time in an other way?

(I sadly do not have the possibility to change the php.ini)

3

You can alter the index.php file and add [set_time_limit][1](300); anywhere below the <?php tag.

You can also try to set it by ini_set('max_execution_time', 300);

For the reason why it returns a 500 Internal Server Error, the server does not support the php_value and php_flag parameters through the htaccess file or it doesnt use the php5 module. You can try setting the php_value directly and check again for errors, or contact your hosting provider for support

  • Thanks! ini_set('max_execution_time', 300); works fine – Jonathan Schiffner Feb 26 '16 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.