php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43088 ob_gzhandler broken.
Submitted: 2007-10-23 18:57 UTC Modified: 2007-10-25 12:24 UTC
From: radamantis at gmail dot com Assigned:
Status: Not a bug Package: Output Control
PHP Version: 5.2.4 OS: Windows XP SP2
Private report: No CVE-ID: None
 [2007-10-23 18:57 UTC] radamantis at gmail dot com
Description:
------------
Apache2 module.

PHP-recommended.ini / default
output_handler =
zlib.output_compression = Off

ob_start('ob_gzhandler') doesn't work as expected. The same if wrapped into a function.


Reproduce code:
---------------
#1
ob_start('ob_gzhandler');
echo "Something";
ob_end_flush();
echo "Hello World";

// Call undefined function
call_some_user_function();

#2
function compress_data($output)
{
  return ob_gzhandler($output);
}

ob_start('compress_data');
echo "Something<br/>";
ob_end_flush();
echo "Hello World";

// Call undefined function.
call_some_user_function();


Expected result:
----------------
#1
Something
Hello World
Fatal error: Call to undefined function call_some_user_function() in some_file.php........

#2
Something
Hello World
Fatal error: Call to undefined function call_some_user_function() in some_file.php........

Actual result:
--------------
#1
Something

Nothing happens, no fatal error at all, in fact, looks like there's no more processing from that point on.

#2
Hello World
Fatal error: Call to undefined function call_some_user_function() in some_file.php........

Where's the buffer?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-25 12:24 UTC] jani@php.net
See bug #37714

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 21:01:31 2024 UTC