From: stanislas dot removethis dot renan at volcane dot fr
Operating system: linux 2.4
PHP version: 4.3.4
PHP Bug Type: Output Control
Bug description: virtual and ob_handler conflict
Description:
------------
[tested with php 4.1.2 only because my providers disabled virtual() on
their 4.3.4 version]
It seems that when using both ob_start() and virtual() does not work.
Contents of the virtual-ly included file is not parsed through the
ob_start() handler function.
Even worse : handler of ob_start() is no more used after the call of
virtual().
Reproduce code:
---------------
===
<?php
function f($buffer)
{
return (str_replace('1', '2', $buffer));
}
ob_start('f');
?>
111
<?php
virtual('afile.html');
?>
111
===
afile.html :
===
111
===
Expected result:
----------------
222
222
222
Actual result:
--------------
222
111
111
--
Edit bug report at http://bugs.php.net/?id=26860&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26860&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26860&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26860&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26860&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26860&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26860&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26860&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26860&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26860&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26860&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26860&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26860&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26860&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26860&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26860&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26860&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26860&r=float