|
Posted by hakim on 11/02/36 11:32
Hi NG,
I have my own apache server 2.0.54 running with php 4.3.10 on debian
sarge.
I got a little logical problem here about http requests.
I have written a small php script which waits for 360 seconds. Every
second it appends the seconds to a file.
I expected a timeout after 300 seconds, because 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.
On the other hand I expected a timeout after 30 seconds, because
max-execution-time in php.ini is set to 30.
One apache group user said, that maybe the max-execution-time of
php.ini maybe only applies to CPU time (non-sleeping).?
Anotherone said, that I am not using the right php.ini. But in
phpinfo(); it's:
Configuration File (php.ini) Path: /etc/php4/apache2/php.ini
And that's the php.ini i am working with.
How I can prevent scripts of running endless??? Which parts are
responsible? Does my script stop on your installations after the time
of max-execution-time?
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...
[Back to original message]
|