Bug #36514 [Com]: ob_gzhandler() issue
| From: | john dot nicholls at eagleeye dot com | Date: | Sun, 16 Feb 2020 23:20:31 +0000 |
| Subject: | Bug #36514 [Com]: ob_gzhandler() issue | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-225602@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=36514&edit=1
ID: 36514
Comment by: john dot nicholls at eagleeye dot com
Reported by: lunter at interia dot pl
Summary: ob_gzhandler() issue
Status: No Feedback
Type: Bug
Package: Output Control
Operating System: winXP
PHP Version: 5.1.2
Assigned To: mike
Block user comment: N
Private report: N
New Comment:
The test cases already provided remain valid.
Using PHP 5.6.40 on CentOS Linux release 7.7.1908 (Core), we experience the same issue.
It has proven possible however, to work around the bug by using a second level of output buffering:
// script 3
<?
ob_start('ob_gzhandler');
ob_start();
print(str_repeat('a',5));
ob_end_clean();
print(str_repeat('b',5));
ob_end_flush();
?>
Previous Comments:
------------------------------------------------------------------------
[2012-03-16 09:27:59] mike@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
------------------------------------------------------------------------
[2011-09-19 14:40:30] mike@php.net
Please try using this snapshot:
http://snaps.php.net/php5.4-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
------------------------------------------------------------------------
[2010-12-10 16:46:45] roan dot kattouw at gmail dot com
I've analyzed the output of a similar test case (ob_clean() before any output, to clear any
warnings) in a hex editor and compared it to gzip -c 's output for the same input. It's
quite clear that the ob_gzhandler output is missing the gzip header but is otherwise similar
(identical except for the occasional 4-byte block, I'm guessing those are checksums or
something). So Mark would seem to be right that the GZIP header gets thrown out by ob_clean() and
doesn't come back.
------------------------------------------------------------------------
[2010-06-18 22:43:26] jani@php.net
Assigned to someone who cares.
------------------------------------------------------------------------
[2009-08-18 14:56:59] jani@php.net
Need to investigate if this is a) fixed in HEAD by the new output code (or fix it if not) and b) if
it's actually fixable somehow in 5.* branches.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=36514
--
Edit this bug report at https://bugs.php.net/bug.php?id=36514&edit=1