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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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: Mon May 06 18:01:35 2024 UTC