php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36921 ob_start("ob_gzhandler");
Submitted: 2006-03-30 10:58 UTC Modified: 2006-04-07 01:00 UTC
Votes:4
Avg. Score:4.5 ± 0.9
Reproduced:4 of 4 (100.0%)
Same Version:0 (0.0%)
Same OS:4 (100.0%)
From: caio53 at gmail dot com Assigned:
Status: No Feedback Package: Output Control
PHP Version: 5.1.2 OS: Windows, Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: caio53 at gmail dot com
New email:
PHP Version: OS:

 

 [2006-03-30 10:58 UTC] caio53 at gmail dot com
Description:
------------
ob_clean(); doesn't work when I use ob_start("gz_handler");

Reproduce code:
---------------
<?php

    error_reporting(E_ALL);
    ob_start("gz_handler");
    echo "content";
    ob_clean();
    echo "more content";

?>

Expected result:
----------------
more content

Actual result:
--------------
content
Notice: ob_clean() [ref.outcontrol]: failed to delete buffer. No buffer to delete. in D:\neatcode\test.php on line 6
more content

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-30 18:10 UTC] mike@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

There's no gz_handler, ie. you didn't actually start any output buffer.
 [2006-03-30 19:32 UTC] caio53 at gmail dot com
Description:
------------
ob_clean(); doesn't properly with ob_start("ob_gzhandler");

Reproduce code:
---------------
<?php

    error_reporting(E_ALL);
    ob_start("ob_gzhandler");
    echo "content";
    ob_clean();
    echo "more content";

?>

Expected result:
----------------
more content

Actual result:
--------------
*no output*

Workaround:
--------------
<?php

    error_reporting(E_ALL);
    ob_start("ob_gzhandler");
    echo "content";
    ob_end_clean();
    ob_start("ob_gzhandler");
    echo "more content";

?>
 [2006-03-30 19:39 UTC] bjori@php.net
ob_gzhandler is only available if PHP was compiled with --with-zlib
 [2006-03-30 19:53 UTC] caio53 at gmail dot com
phpinfo();
ZLib Support 	enabled
Stream Wrapper support 	compress.zlib://
Stream Filter support 	zlib.inflate, zlib.deflate
Compiled Version 	1.2.3
Linked Version 	1.2.3

and function_exists('ob_gzhandler') returns true
 [2006-03-30 20:01 UTC] mike@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip

Works fine here.
 [2006-04-07 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 08:01:28 2024 UTC