Bug #12907 Updated: Callback causes apache to hang
| From: | yohgaki@php.net | Date: | Wed, 12 Dec 2001 09:41:50 +0000 |
| Subject: | Bug #12907 Updated: Callback causes apache to hang | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-73244@lists.php.net to get a copy of this message | ||
ID: 12907
Updated by: yohgaki
Reported By: gregm@onlinecreatorinc.com
Old Status: Open
Status: Closed
Bug Type: Output Control
Operating System: RedHat 6.2 / Linux 2.4
PHP Version: 4.0.6
New Comment:
4.1.0 does not have problem. Please reopen if you still have the same problem.
Previous Comments:
------------------------------------------------------------------------
[2001-08-22 15:01:13] gregm@onlinecreatorinc.com
I have a problem using a callback function with ob_start, causing apache httpd instances to hang,
and remain for a very long time. Each instance was using 2-4 % cpu and was causing apache to launch
new processes to keep up server demand, then those servers were hanging, etc, and I was seeing an
average load up in the 50-70 range (vs around 1.0 normally)
Basically:
<?
function obCallback($buffer) {
return str_replace("hello", "hi", $buffer);
}
ob_start("obCallback");
echo "hello there";
ob_end_flush();
?>
was causing problems. I've gotten around it by using ob_get_contents then ob_end_clean and just
using my function on the contents.
my configure line for php is:
'./configure' '--prefix=/usr/local'
'--with-apache=/root/apachetoolbox/apache_1.3.20' '--enable-exif'
'--enable-track-vars' '--with-calendar=shared' '--enable-safe-mode'
'--enable-magic-quotes' '--enable-trans-sid' '--enable-wddx'
'--enable-ftp' '--with-gd' '--with-zlib'
'--enable-gd-native-tt' '--with-t1lib=/usr/local/lib/php/t1libs'
'--with-jpeg-dir' '--with-png-dir' '--with-zlib-dir'
'--with-ttf' '--with-freetype-dir' '--with-imap'
'--with-mhash' '--with-mcrypt' '--with-unixODBC=/usr/local/unixODBC'
'--with-pdflib=/root/apachetoolbox/src/pdflib-3.03' '--enable-shared-pdflib'
'--with-snmp=/usr/local/snmp' '--with-openssl'
'--with-curl=/usr/local' '--with-bcmath' '--with-mysql=/usr/local'
'--with-mnogosearch=/usr/local/mnogosearch'
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12907&edit=1