Edit report at https://bugs.php.net/bug.php?id=55544&edit=1
ID: 55544
Updated by: laruence@php.net
Reported by: diogin at gmail dot com
Summary: ob_gzhandler always conflicts with
zlib.output_compression
Status: Re-Opened
Type: Bug
Package: Output Control
Operating System: Windows XP SP3 x86
PHP Version: 5.4.0alpha3
Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
Here is the problem
ext/zlib/zlib.c
@@ -205,7 +205,7 @@ static int php_zlib_output_handler(void **handler_context,
php_output_context *o
if (SUCCESS ==
php_output_handler_hook(PHP_OUTPUT_HANDLER_HOOK_GET_FLAGS, &flags TSRMLS_CC)) {
/* only run this once */
if (!(flags & PHP_OUTPUT_HANDLER_STARTED)) {
if (SG(headers_sent) ||
!ZLIBG(output_compression)) {
seems we need a bigger work to resolve this
Previous Comments:
------------------------------------------------------------------------
[2012-07-24 03:33:54] laruence@php.net
oh, I mis-understand your codes, verified.
------------------------------------------------------------------------
[2012-07-24 02:44:01] laruence@php.net
I tested with php build server, didn't reproduce your issue.
test script:
<?php
ob_start('ob_gzhandler');
echo 'hello, world';
ob_end_flush();
?>
server response:
HTTP/1.1 200 OK
Host: inf-dev-porsche.weibo.com:8964
Connection: close
X-Powered-By: PHP/5.5.0-dev
Content-Encoding: gzip
Vary: Accept-Encoding
Content-type: text/html
------------------------------------------------------------------------
[2012-07-23 14:23:12] bugs dot php at mohiva dot com
The error message is gone, but the gzip compression doesn't work no longer.
The configuration that I use in php-fpm.conf is:
php_flag[output_buffering] = on
php_flag[zlib.output_compression] = off
php_value[output_handler] = ob_gzhandler
Can someone of the devs mark the bug 62335 as duplicate.
------------------------------------------------------------------------
[2012-07-20 18:58:09] laruence@php.net
Please try using this snapshot:
http://snaps.php.net/php5.4-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Hi, I've made a fix for this, could you please try with it?
------------------------------------------------------------------------
[2012-07-20 18:56:45] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=a6f1533789b897d3b8930b437164e81e0a0f4c72
Log: Fixed bug #55544 (ob_gzhandler always conflicts with zlib.output_compression)
------------------------------------------------------------------------
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=55544
--
Edit this bug report at https://bugs.php.net/bug.php?id=55544&edit=1