#18917 [NEW]: output buffer functions and errors in the script
| From: | ntpt at centrum dot cz | Date: | Thu, 15 Aug 2002 13:01:31 +0000 |
| Subject: | #18917 [NEW]: output buffer functions and errors in the script | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-16901@lists.php.net to get a copy of this message | ||
From: ntpt@centrum.cz
Operating system: RH 7.3
PHP version: 4.2.2
PHP Bug Type: Output Control
Bug description: output buffer functions and errors in the script
Error or Warnings in script, that use ob_start("callback") or
ob_get_contents() can cause buffer to be "cut off" or completly crippled
and filled with trash ....
ob_start("callback_func")
{
// main loop
do something here
output something here
}
function callback_func($buffer)
{
$result=do_something( $buffer);
return $result;
}
if some error or waring occures in main loop, content of the output
buffer may be
crippled, seems that ob_get_content() returns some short snipplet of
binary data only , in my case it is
ÁUð1À
ÒtÈB¸ûÿÿ
ÒuUèeô[^_]ÃWj or shortened ( not all length
of the output buffer is parsed to callback_func).
I have sugestion, how PHP should treat errors in the output_buffered
scripts.
If error occures in the main loop (not in the callback function) ,all
output of the script with error or waring messages appended SHOULD be
passed as parameter to callback_function...
If error occures inside the callback_function, SHOULD BE at least error
message send to browser.
--
Edit bug report at http://bugs.php.net/?id=18917&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=18917&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=18917&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=18917&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=18917&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=18917&r=support
Expected behavior: http://bugs.php.net/fix.php?id=18917&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=18917&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=18917&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=18917&r=globals