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

From: Date: Thu, 04 Apr 2002 13:41:01 +0000
Subject: Bug #11491 Updated: When using ob_start("ob_gzhandler") transient SID gets broken
References: 1  Groups: php.bugs php.doc 
Request: Send a blank email to php-bugs+get-4040@lists.php.net to get a copy of this message
ID: 11491 Updated by: ernest@vogelsinger.at Reported By: alain@valain.com Status: Closed Bug Type: Documentation problem Operating System: Windows 2000 Server PHP Version: 4.0.5 New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ [2001-06-21 14:24:22] sniper@php.net This should be mentioned in the manual? Reclassified as docu prob. ------------------------------------------------------------------------ [2001-06-20 17:05:01] hholzgra@php.net output buffering takes place before the transient sid mechanism, which is the last thing to happen before the actual script output is passed on to the webserver so the trans-sid parser will not recognize the URLs in the already compressed output, thats it ------------------------------------------------------------------------ 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 (#4040) next »