title: Script times out even with set_time_limit(0) PHP/Apache
body: <p>I set time limit for my scrip to 0 so it can take as long as it needs:</p>
  
  <pre><code>set_time_limit(0);
  </code></pre>
  
  <p>When I run the script after few minutes it times out and returns <strong>500 Internal Server Error</strong> with the following error from apache <strong>error_log</strong>:</p>
  
  <pre><code> Script timed out before returning headers: index.php
  </code></pre>
  
  <p>How can I increase timeout from PHP code and not touching <strong>httpd.conf</strong> or <strong>php.ini</strong> file. I dont have access to those files.</p>