From:             clover at fromru dot com
Operating system: WinXP, SuSe 9.2 (PHP:4.3...)
PHP version:      5.0.3
PHP Bug Type:     Output Control
Bug description:  Output Buffering Bug

Description:
------------
i'm using ob_start() with a callback function; internally in it i use
$res=var_export($var, TRUE) function but got an error:
[11-Feb-2005 08:28:15] PHP Fatal error:  var_export() [<a
href='ref.outcontrol'>ref.outcontrol</a>]: Cannot use output buffering in
output buffering display handlers in E:\htdocs\index.php on line XXX

Reproduce code:
---------------
<?php
ob_start("my_shutdown_function");

function my_shutdown_function($buffer){
  $var=headers_list();
  $res=var_export($var, TRUE);
  return($res);
}

print("something...");
?>

Expected result:
----------------
the "dump" of all sent headers instead of string "something..."

Actual result:
--------------
"PHP Fatal error..."

Comment: this error actually must be when i call var_dump() or
var_export($var, FALSE) in output buffering handler.

-- 
Edit bug report at http://bugs.php.net/?id=31929&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31929&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31929&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31929&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31929&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31929&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31929&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31929&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31929&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31929&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31929&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31929&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31929&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31929&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31929&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31929&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31929&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31929&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31929&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31929&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31929&r=mysqlcfg

Reply via email to