Bug #11491 Updated: When using ob_start("ob_gzhandler") transient SID gets broken

From: Date: Thu, 04 Apr 2002 14:22:40 +0000
Subject: Bug #11491 Updated: When using ob_start("ob_gzhandler") transient SID gets broken
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-4042@lists.php.net to get a copy of this message
ID: 11491 Updated by: yohgaki@php.net -Reported By: alain@valain.com +Reported By: ernest@vogelsinger.at Status: Open Bug Type: Feature/Change Request Operating System: Windows 2000 Server PHP Version: 4.0.5 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2002-04-04 08:47:34] derick@php.net reopen as feature request ------------------------------------------------------------------------ [2002-04-04 08:41:00] ernest@vogelsinger.at 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] sander@php.net No feedback. Closing. ------------------------------------------------------------------------ [2001-12-22 08:40:26] sander@php.net No feedback. Closing. ------------------------------------------------------------------------ [2001-12-01 12:15:00] sebastian@php.net This should be fixed, please try a recent version of PHP. ------------------------------------------------------------------------ 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

« previous php.bugs (#4042) next »