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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
36 + 39 = ?
Subscribe to this entry?

 
 [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: Sun Jun 16 21:01:29 2024 UTC