note 91606 added to function.flush
| From: | tobias at dcode dot se | Date: | Fri, 19 Jun 2009 08:21:34 +0000 |
| Subject: | note 91606 added to function.flush | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-157113@lists.php.net to get a copy of this message | ||
Following the speed-up rules from http://developer.yahoo.com/performance/rules.html
in the topic "Flush the Buffer Early" with ob_start() will output headers early and
thereby corrupt error handling events extended with eg. FirePHP that will trigger something like;
"Exception thrown within the exception handler. Message: Headers already sent in on line 0.
Cannot send log data to FirePHP." or "Exception thrown without a stack frame in Unknown on
line 0".
So use </head><?= ob_flush(); =?><body> instead to invoke this rule/recommendation
with ob_start(); to make it work.
----
Server IP: 203.121.145.220
Probable Submitter: 118.173.2.66
----
Manual Page -- http://www.php.net/manual/en/function.flush.php
Edit -- https://master.php.net/note/edit/91606
Del: integrated -- https://master.php.net/note/delete/91606/integrated
Del: useless -- https://master.php.net/note/delete/91606/useless
Del: bad code -- https://master.php.net/note/delete/91606/bad+code
Del: spam -- https://master.php.net/note/delete/91606/spam
Del: non-english -- https://master.php.net/note/delete/91606/non-english
Del: in docs -- https://master.php.net/note/delete/91606/in+docs
Del: other reasons-- https://master.php.net/note/delete/91606
Reject -- https://master.php.net/note/reject/91606
Search -- https://master.php.net/manage/user-notes.php