Answers.Body: <p>You can alter the index.php file and add <code>[set_time_limit][1](300);</code> anywhere below the <code>&lt;?php</code> tag. </p>
  
  <p>You can also try to set it by <code>ini_set('max_execution_time', 300);</code></p>
  
  <p><em>For the reason why it returns a 500 Internal Server Error, the server does not support the <code>php_value</code> and <code>php_flag</code> parameters through the htaccess file or it doesnt use the php5 module. You can try setting the <code>php_value</code> directly and check again for errors, or contact your hosting provider for support</em></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-26T12:56:42.260Z
Answers.Text: Thanks! `ini_set('max_execution_time', 300);` works fine
Answers.UserDisplayName: Jonathan Schiffner
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-26T12:43:57.080Z
Answers.LastActivityDate: 2016-02-26T12:43:57.080Z
Answers.UserDisplayName: chris
Body: <p>I want to change the max_execution_time in the .htaccess file. I tried it in this way: <code>&lt;IfModule mod_php5.c&gt; php_value max_execution_time 300 &lt;/IfModule&gt;</code> but then I got a <em>500 internal server error</em>. 
  My .htaccess file also includes this: </p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      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]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>Any idea why I got this error? Or how I can change the max_execution_time in an other way?</p>
  
  <p>(I sadly do not have the possibility to change the php.ini)</p>
  
Tags: <htaccess>
Title: .htaccess max_execution_time
ThreadText: # .htaccess max_execution_time
  
  (Asked by: username_0 on 2016-02-26)
  
  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)
  
  **Tags:** htaccess
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-02-26. Score: 4 | Accepted answer
  
  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*
  
  > **Comments:**
  > **username_0**: Thanks! `ini_set('max_execution_time', 300);` works fine  
  
  ---
  
  