You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Achim Stumpf <ha...@web.de> on 2005/11/17 13:31:13 UTC

[users@httpd] apache php timeout ?

Hi NG,

I have my own apache server 2.0.54 running with php 4.3.10.

I got a little logical problem here about http requests.

I have written a small php script which waits for x seconds. Every
second it appends the seconds to a file.

I expected a timeout after 300 seconds, becouse apache is configured
like that. But until now it doesn't matter. I can wait for more than 5
minutes and the script finishes i see the result page.

Why my browser doesn't get a timeout. Which part is responsible for a
timeout???

On the comp.lang.php group they gave up. One said that it is
configurable over the directive max-execution-time in php.ini. BUT this
one is set to
30 seconds. The timeout directive in httpd.conf is 300 seconds.

Here the code:

<?php

        // All print functions do not show up on the screen until it is
finished
        print 'Now we wait<br>';

        for($i = 1; $i <= 360; ++$i) {
                sleep(1);
                print "$i<br>";
                $handle = fopen('test.dat', "a");
                fwrite($handle, $i . "\n");
                fclose($handle);
        }

        print '<br><br>End...<br>';

?>

Thanks...



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] apache php timeout ?

Posted by Olaf van der Spek <ol...@gmail.com>.
On 11/17/05, Achim Stumpf <ha...@web.de> wrote:
>
> Hi NG,
>
> I have my own apache server 2.0.54 running with php 4.3.10.
>
> I got a little logical problem here about http requests.
>
> I have written a small php script which waits for x seconds. Every
> second it appends the seconds to a file.
>
> I expected a timeout after 300 seconds, becouse apache is configured
> like that. But until now it doesn't matter. I can wait for more than 5
> minutes and the script finishes i see the result page.
>
> Why my browser doesn't get a timeout. Which part is responsible for a
> timeout???

I think the Apache timeout doesn't kick in during request processing.
Otherwise it would be kinda hard to download a big file.
The PHP timeout maybe only applies to CPU time (non-sleeping).