PHP 4.0 Bug #4798: PHP/Apache sits in a loop
| From: | d dot rethans at jdimedia dot nl | Date: | Sat, 03 Jun 2000 21:10:46 +0000 |
| Subject: | PHP 4.0 Bug #4798: PHP/Apache sits in a loop | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-20139@lists.php.net to get a copy of this message | ||
From: d.rethans@jdimedia.nl
Operating system: Linux 2.2.13
PHP version: 4.0.0 Release
PHP Bug Type: Scripting Engine problem
Bug description: PHP/Apache sits in a loop
The followings script describes a simple loop which never ends:
<?php
do {
printf ("test"); flush();
} while (1==1);
?>
so i must hit the stop button in my browser to end this script. Unfortunately, it seems that these
processes
never stop. I've now ended up with a load average of 23.32 and 25 apache processes. After a
very long time (30 mins) the most of these processes are gone, but some (1-8) still don't end.
Configure command: (same as with php3.0.12)
'./configure' '--with-apache=/dat/APACHE-PHP4/apache_1.3.12'
'--with-gd'
'--with-ttf' '--with-mysql' '--with-pdflib'
'--with-config-file-path=/etc/httpd'
'--enable-track-vars' '--enable-magiq-quotes' '--enable-memory-limit'
I tried the same with php-3.0.12, and no problemos.
Then I noted the option: ignore_user_abort. It seems that in php3.0.12 it defaults to off, en with
php4.0.0 to on. Turning that option on in php.ini solved the whole thing. Then tried this in php
3.0.12:
I set the option ignore_user_abort to "on" in php3.ini; and I reloaded my little script.
As soon as I pushed the "stop" button in the browser, the httpd proces shut down. I think
this is a bug. If you require more information, feel free to contact me.
Derick Rethans