From:             [EMAIL PROTECTED]
Operating system: RedHat 6.2 / Linux 2.4
PHP version:      4.0.6
PHP Bug Type:     Output Control
Bug description:  Callback causes apache to hang

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)



function obCallback($buffer) {
   return str_replace("hello", "hi", $buffer);


echo "hello there";



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'
'--enable-shared-pdflib' '--with-snmp=/usr/local/snmp' '--with-openssl'
'--with-curl=/usr/local' '--with-bcmath' '--with-mysql=/usr/local'

Edit bug report at:

PHP Development Mailing List <>
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