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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: radamantis at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

History

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

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Feb 05 20:01:30 2025 UTC