title: How can I set the maximum execution time for a PHP script?
body: <p>I would like to change the maximum execution time for a PHP script. In the script I have tried </p>
  
  <pre><code>ini_set("max_execution_time", "1000");
  </code></pre>
  
  <p>and</p>
  
  <pre><code>set_time_limit(1000);
  </code></pre>
  
  <p>together and separately.</p>
  
  <p>I also added this line to .htaccess:</p>
  
  <pre><code>php_value max_execution_time 1000
  </code></pre>
  
  <p>php.ini has safemode off and the Apache server has the flag <code>AllowOverride All</code>. What must I do to get the server to allow a longer execution time?</p>