ID: 34071
Updated by: [EMAIL PROTECTED]
Reported By: dennis at nocertainty dot com
-Status: Open
+Status: Feedback
Bug Type: Output Control
Operating System: Windows XP SP2
PHP Version: 5CVS-2005-08-10 (dev)
New Comment:
Are you sure there is nothing shown in the "View Source" tab?
I'm almost sure your browser just hides binary output from you. So try
this:
telnet localhost 80
GET /script.php HTTP/1.0
<Enter>
<Enter>
Previous Comments:
------------------------------------------------------------------------
[2005-08-10 18:50:14] dennis at nocertainty dot com
Yes, that works. But as soon as I use ob_gzhandler, instead of foo,
nothing is displayed.
I run PHP4 and PHP5 at the same time (port 80 is PHP4.3.4, port 83 is
PHP5Dev). Could it be that the bug is caused by my PHP4 installation?
------------------------------------------------------------------------
[2005-08-10 18:39:16] [EMAIL PROTECTED]
Still can't reproduce, even with FCGI.
Does this work for you:
<?php
function foo($data) {
return $data;
}
ob_start('foo');
echo 'Should NOT be shown';
ob_clean();
echo 'Should be shown';
?>
?
------------------------------------------------------------------------
[2005-08-10 18:19:53] dennis at nocertainty dot com
It works with PHP CLI.
SAPI: cgi-fcgi
------------------------------------------------------------------------
[2005-08-10 18:14:58] [EMAIL PROTECTED]
Can't reproduce.
Please try with PHP CLI and tell what SAPI you're using.
------------------------------------------------------------------------
[2005-08-10 18:08:20] dennis at nocertainty dot com
Description:
------------
When using ob_start('ob_gzhandler') and ob_clean() the output buffer is
destroyed, and no ob_* function works anymore. It seems that PHP4 had
this problem as well (http://bugs.php.net/bug.php?id=29125)
Reproduce code:
---------------
<?php
ob_start('ob_gzhandler');
echo 'Should NOT be shown';
ob_clean();
echo 'Should be shown';
?>
Expected result:
----------------
"Should be shown" should've been printed, instead nothing is returned,
and nothing displays anymore.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34071&edit=1