ID: 11491
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: Windows 2000 Server
PHP Version: 4.0.5
New Comment:
This is limitation of ob_gzhandler, use zlib.output_compression.
ob_gzhandler is obsolete.
Previous Comments:
------------------------------------------------------------------------
[2002-04-04 09:22:39] [EMAIL PROTECTED]
I think we are better to make ob_gzhandler obsolete.
1) zlib.output_compression does the compression.
2) zlib.output_compression is more efficient.
3) laest output control code prevents compression buffer deletion.
(Deleting it does not make sense)
4) ob_gzhandler will also have problem with trans_sid, but
zlib.output_compression does not have such problem.
------------------------------------------------------------------------
[2002-04-04 08:47:34] [EMAIL PROTECTED]
reopen as feature request
------------------------------------------------------------------------
[2002-04-04 08:41:00] [EMAIL PROTECTED]
Please reopen - the very same bug is still alive in PHP 4.1.1
(Win32/Apache).
Problem: Any user-defined output handler MUST be called before
trans-sid's are applied since they may very well modify the HTML
output.
Suggestion: add another (opt) parameter to ob_start, specifying a
first-pass handler which will be called _before_ trans-sid's are
applied. The original first parameter specifies the handler that will
be called _after_ applying the trans-sid's.
BEFORE CHANGE (trans-sid's are broken):
string ob_start('my_handler');
function my_handler($buffer, $mode)
{
// do something useful with $buffer
return ob_gzhandler($buffer, $mode);
}
AFTER CHANGE (trans-sid's should work):
string ob_start('ob_gzhandler','my_handler');
function my_handler($buffer, $mode)
{
// do something useful with $buffer
return $buffer;
}
The PHP engine would first call my_handler(), apply trans-sid's next,
and finally call ob_gzhandler(). This solution seems to be a reasonable
change and shouldn't break existing code.
Thanks for consideration!
Ernest E Vogelsinger
------------------------------------------------------------------------
[2001-12-22 08:40:31] [EMAIL PROTECTED]
No feedback. Closing.
------------------------------------------------------------------------
[2001-12-22 08:40:26] [EMAIL PROTECTED]
No feedback. Closing.
------------------------------------------------------------------------
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
http://bugs.php.net/11491
--
Edit this bug report at http://bugs.php.net/?id=11491&edit=1