php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21536 ob_get_length() is broken for ob_gzhandler and zlib.output_compression
Submitted: 2003-01-08 20:49 UTC Modified: 2003-01-08 21:18 UTC
From: jim-bugs dot php dot net at jimdabell dot com Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.3.0 OS: FreeBSD 4.7
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: jim-bugs dot php dot net at jimdabell dot com
New email:
PHP Version: OS:

 

 [2003-01-08 20:49 UTC] jim-bugs dot php dot net at jimdabell dot com
When ob_gzhandler or zlib.output_compression is switched on, ob_get_length() should report the compressed length, however it reports the uncompressed length.

I found an old bug - #12631 - that is identical to this, but it seems it was fixed a while ago, and then "unfixed".

I cannot seem to work around it with strlen(ob_get_contents()).

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-08 21:18 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

For performance reasons compression of the buffer (ob_gzhandler) is only done at the termination of the script once all the output has been collected.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 06:01:32 2024 UTC