ID: 12907
Updated by: yohgaki
Reported By: [EMAIL PROTECTED]
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] [EMAIL PROTECTED]

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


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to