ID: 30264 Updated by: [EMAIL PROTECTED] Reported By: mpn at illearth dot net -Status: Feedback +Status: No Feedback Bug Type: Output Control Operating System: Win NT(2K) PHP Version: 4.3.9 New Comment:
No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". Previous Comments: ------------------------------------------------------------------------ [2004-11-28 14:34:31] [EMAIL PROTECTED] I can't reproduce your problem. headers_sent() reports correct value in any situation when running your reproduce script. ------------------------------------------------------------------------ [2004-10-01 05:12:14] mpn at illearth dot net OK, yes output buffering in the ini is set to the default of 4096. So based on what I am seeing (i.e. ouput in the browser), the buffer is being flushed at 4096 bytes, however the value of headers_sent() is still FALSE, even though it appears the buffer has been flushed at least once, if not several times at the point of the exit. Now what is even more quirky is I can clean and shutdown all the buffers prior to the exit in the error handler and I will not get any screen output in the browser. When doing this the value of headers_sent() is still FALSE. This suggests the buffer has not been flushed at it's default flush point. So two senarios exist here: 1) Do NOT clean and shutdown the buffers and I get output in the browser up to the point of the fatal error exit in the error handler. The value of headers_sent() is FALSE. 2) Clean and shutdown all buffers at the point of the fatal error exit in the error handler, no output to the browser has been sent. The value of headers_sent() is FALSE. In the first senario, the value of headers_sent() should be TRUE since I am seeing intended output in the browser. ------------------------------------------------------------------------ [2004-10-01 05:12:14] mpn at illearth dot net OK, yes output buffering in the ini is set to the default of 4096. So based on what I am seeing (i.e. ouput in the browser), the buffer is being flushed at 4096 bytes, however the value of headers_sent() is still FALSE, even though it appears the buffer has been flushed at least once, if not several times at the point of the exit. Now what is even more quirky is I can clean and shutdown all the buffers prior to the exit in the error handler and I will not get any screen output in the browser. When doing this the value of headers_sent() is still FALSE. This suggests the buffer has not been flushed at it's default flush point. So two senarios exist here: 1) Do NOT clean and shutdown the buffers and I get output in the browser up to the point of the fatal error exit in the error handler. The value of headers_sent() is FALSE. 2) Clean and shutdown all buffers at the point of the fatal error exit in the error handler, no output to the browser has been sent. The value of headers_sent() is FALSE. In the first senario, the value of headers_sent() should be TRUE since I am seeing intended output in the browser. ------------------------------------------------------------------------ [2004-09-30 22:45:44] [EMAIL PROTECTED] If you are using default config you probably have output buffering enabled, which makes PHP buffer output data in 4096 chunks. ------------------------------------------------------------------------ [2004-09-30 16:11:04] mpn at illearth dot net Let me put this into the context of the problem I am having. I am using a custom error handler. At the error threshold where script execution will exit I need to check if headers had been sent in order to determine if output compression needs to be enabled and buffers cleaned/shutoff. Apparently stacking compressed output buffers (even if they have been "cleaned" of content) is restricted since it destroys the output (i.e. the browser shows compressed output). This may be a bug in itself since according to documentation output buffers are stackable with no mention of any restrictions. So let's take it step by step. 1) script excution starts 2) get support includes 3) start output (i.e. headers are set, ouput buffering started, output content printed/echoed). 4) Trigger a fatal exit error. 5) var_dump the return of headers_sent() and exit prior to sending any error messages to the browser or flushing any buffers. At this point the normal expected output, up to the point of the error, has been sent to the browser, however the value of headers_sent() is still FALSE even though I am looking at the expected output in the browser, with the variable dump value at the bottom of that output where the exit occurs. ------------------------------------------------------------------------ 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/30264 -- Edit this bug report at http://bugs.php.net/?id=30264&edit=1