PHP max_execution_time ignored (no safe mode, no shared host, just localhost/windows7/php 5.3.1 and Apache timeout is 300)
<p>This problem drives me nuts, because the max_execution_time in the php.ini and in the htaccess and reported from php is definitely higher, than reportet in the warning message.</p>

<pre><code>&lt;?php
echo "Max execution time: ".ini_get("max_execution_time")."&lt;br /&gt;";
while(true)
{
    sleep(1);
}
?&gt;
</code></pre>

<p>Output:</p>

<p>Max execution time: 240</p>

<p>Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\timetest.php on line 5</p>

<p><strong>Answer</strong></p>

<p>Yes, it seems to be a bug:
max_input_time overwrites max_execution_time!</p>

<p>htaccess:</p>

<pre><code>php_value max_execution_time 240
php_value max_input_time 111
</code></pre>

<p>timetest.php:</p>

<pre><code>&lt;?php
echo "Max execution time: ".ini_get("max_execution_time")."&lt;br /&gt;";
echo "Max input time: ".ini_get("max_input_time")."&lt;br /&gt;";
while(true)
{
    sleep(1);
}
?&gt;
</code></pre>

<p>Output (proof):</p>

<p>Max execution time: 240</p>

<p>Max input time: 111</p>

<p>Fatal error: Maximum execution time of 111 seconds exceeded in C:\xampp\htdocs\timetest.php on line 6</p>

<p>Thanks for the help!</p>
