note 54355 added to function.ob-end-flush
| From: | skippy at zuavra dot net | Date: | Fri, 01 Jul 2005 09:10:53 +0000 |
| Subject: | note 54355 added to function.ob-end-flush | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-91248@lists.php.net to get a copy of this message | ||
Apart from being mostly redundant, ob_end_flush() can be downright damaging in some weird cases.
Actual example: a particular page on an Intranet website which would appear blank on Internet
Explorer 6 when ob_start('ob_gzhandler') was called in the beginning and ob_end_flush() at
the end.
We couldn't figure out what made that page special no matter what we tried. The ob_ functions
were placed in scripts which were include()'d by all pages just the same, but only that page
did this.
Even stranger, the problem only appeared on direct browser/server connections. Whenever the
connection passed through a proxy the problem dissapeared. I'm guessing some kind of HTTP
encoding headers mumbo-jumbo.
Solution: unless you really need it in particular cases, remove the ob_end_flush() call and rely on
the builtin, automatic buffer flush.
----
Manual Page -- http://www.php.net/manual/en/function.ob-end-flush.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54355
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54355&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54355&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54355&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54355&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54355&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54355&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54355&report=yes
Search -- http://master.php.net/manage/user-notes.php