Edit report at https://bugs.php.net/bug.php?id=55544&edit=1
ID: 55544
Comment by: bugs dot php at mohiva dot com
Reported by: diogin at gmail dot com
Summary: ob_gzhandler always conflicts with
zlib.output_compression
Status: Closed
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:
Now, it works for me.
Previous Comments:
------------------------------------------------------------------------
[2012-07-24 06:55:04] [email protected]
re-fixed agian...
------------------------------------------------------------------------
[2012-07-24 06:44:41] [email protected]
Automatic comment on behalf of laruence
Revision:
http://git.php.net/?p=php-src.git;a=commit;h=4c1e2bbd6f744b4048d4e0540ecc5dbe005494fe
Log: Re-fix bug #55544
------------------------------------------------------------------------
[2012-07-24 06:42:27] [email protected]
Automatic comment on behalf of laruence
Revision:
http://git.php.net/?p=php-src.git;a=commit;h=4c1e2bbd6f744b4048d4e0540ecc5dbe005494fe
Log: Re-fix bug #55544
------------------------------------------------------------------------
[2012-07-24 06:17:34] [email protected]
here is the confusion(assuming -d output_handler=ob_gzhandler -d
zlib.output_compression=0) :
1. php.output_handler will change the ZLIGB(output_compression) before the zlib
RINIT
2. in zlib RINIT, we set the ZLIBG(output_compression) to default value(ini)
3. if we don't override the ZLIBG(output_compression), then in the
php_zlib_output_compression_start which will be called in RINT will try to
start
zlib compression handler (although it depends on the requeset header), then,
the
conflict warning will be threw.
4. if we override it, then it the php_zlib_output_compression_start, it will
return FALIURE, and no compression occurred(see the codes from my previous
reply)
so, the key problem is multi-featrues depends on one global flag ->
ZLIBG(output_compression).
------------------------------------------------------------------------
[2012-07-24 05:12:35] [email protected]
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
------------------------------------------------------------------------
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