From: [EMAIL PROTECTED]
Operating system: Linux 2.2.16-SMP
PHP version: 4.0.6
PHP Bug Type: Output Control
Bug description: Output puffering causes Apache to SIGSEGV
When using ob_start() with a script included via auto_prepend_file and then
doing something like this:
ob_start("my_flush");
function my_flush($buffer)
{
$buffer = preg_replace("/(<!--REPLACE\\s.*?-->)/e", "parse(\"\\1\")",
$buffer);
return $buffer;
}
PHP 4.0.6 SIGSEGV's with this message in the error_log:
[Wed Jul 18 11:55:08 2001] Script: '/home/htdocs/test.php'
---------------------------------------
output.c(235) : Block 0x0824C940 status:
Beginning: Overrun (magic=0x08294990, expected=0x7312F8DC)
End: Unknown
---------------------------------------
./zend_execute.c(334) : Freeing 0x082A8CB4 (28131 bytes),
script=/home/htdocs/test.php
zend_variables.c(117) : Actual location (location was relayed)
[Wed Jul 18 11:55:08 2001] [notice] child pid 30192 exit signal
Segmentation fault (11)
If I replace the line
$buffer = preg_replace("/(<!--REPLACE\\s.*?-->)/e", "parse(\"\\1\")",
$buffer);
with
$newbuffer = preg_replace("/(<!--REPLACE\\s.*?-->)/e",
"parse(\"\\1\")",
$buffer);
it works fine.
Any ideas for a fix?
Harry
--
Edit bug report at: http://bugs.php.net/?id=12227&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]