#19668 [Opn->Fbk]: Crash when using callback with ob_start()

From: Date: Tue, 01 Oct 2002 07:25:57 +0000
Subject: #19668 [Opn->Fbk]: Crash when using callback with ob_start()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-20881@lists.php.net to get a copy of this message
ID: 19668 Updated by: sniper@php.net Reported By: phpbugs@realplain.com -Status: Open +Status: Feedback Bug Type: Output Control Operating System: Win2000 PHP Version: 4.2.3 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-10-01 01:58:14] phpbugs@realplain.com Yes, that seems to have fixed it. However, on any larger, more complicated scripts (e.g. not the example I posted), including where I discovered the crash, Apache crashes if you refresh the page quickly. But I guess that's another issue in the dev build... ------------------------------------------------------------------------ [2002-09-30 09:43:54] sander@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip ------------------------------------------------------------------------ [2002-09-30 03:09:03] phpbugs@realplain.com System: Win2000 SP3 (dual CPU if it matters), Apache 1.3.26 (default setup), and PHP 4.2.3 as a module (default setup) Problem: When I use ob_start('callback') and "callback" takes $var as its parameter, Apache crashes if you modify $var and reassign it to $var. Code: <?php ob_start('test'); echo 'This is a test!'; function test($output) { $output = strtoupper($output); return $output; // Use this instead of the above and it works $test = strtoupper($output); return $test; } ?> It seems that an Apache child thread can process the script once before it crashes the child process. e.g. Refresh within KeepAliveTimeout seconds and it will crash; or with KeepAlive Off, it crashes after ThreadsPerChild requests. The "Apache.exe has generated errors..." box pops up. The only thing in Apache's error log is [info] master_main: Child processed exited prematurely. Restarting the child process. I have the "Dr. Watson" crash log file that was generated if it's of any use: http://www.realplain.com/phpcrash.txt BTW, that's weird; I just closed some apps that I usually have running so their processes wouldn't show up in that log and now I can't get the above script to crash every time (or at all!) like I could a few mins ago. Hmm... So don't know if you can reproduce it. However, the script where I originally noticed it is still crashing consistently as before. Thanks for your time. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19668&edit=1

« previous php.bugs (#20881) next »