ID: 22713 Updated by: [EMAIL PROTECTED] Reported By: public at asd-group dot com -Status: Feedback +Status: No Feedback Bug Type: Output Control Operating System: Windows XP PHP Version: 4.3.2-RC New Comment:
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: ------------------------------------------------------------------------ [2003-07-13 00:06:00] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip And update the version if it still happens with the snapshot. ------------------------------------------------------------------------ [2003-04-28 12:33:09] [EMAIL PROTECTED] Related to #21637, assuming that you are using ISAPI. ------------------------------------------------------------------------ [2003-03-22 11:22:27] public at asd-group dot com Anyone looking at this problem - there is no workaround to this, so a fix is needed? ------------------------------------------------------------------------ [2003-03-17 20:46:48] public at asd-group dot com I'm not sure how this just became a documentation problem. Sure, the recent manuals are incomplete/wrong with respect to ob_start, and that should be corrected. And regarding the chunk size parameter, I can tell you from actual testing and feedback from someone who knows the PHP source code (see http://www.zend.com/phorum/read.php?num=3&id=23814&loc=0&thread=23814) that it *DOES* cause the output callback to be called *ONCE* for each output statement, whether it is just one character (echo "1") or many (echo "A very,very,.....very,very long string"). That doesnt sound like setting a chunk size of 2 to me (assuming that means that the output buffer is flushed in chunks of 2 characters - without the correct info in the manual its hard to know). However, in any event, if the output callback instructs PHP to ignore the output text (by returning "") then headers should not be flushed and headers_sent() should continue to return FALSE. In a much larger application (too large to post), where I first saw this, there's an an additional curiosity. With output being captured and 'thrown away' by the output callback in this manner, the first 'echo' statement causes headers_sent() to return true, yet the code later does header() calls to set cookies, and these do not fail with a 'headers already sent' type of message (and the cookies get sent). I hoped to reproduce this within the little code snippet above, but that does fail with the expeced message if a call to header() is made after the first echo statement. Please could you recategorise this to a code issue. ------------------------------------------------------------------------ [2003-03-17 20:08:32] [EMAIL PROTECTED] Here's the proto for ob_start(): proto bool ob_start([ string|array user_function [, int chunk_size [, bool erase]]]) The 2nd parameter determines the chunk size..not how many times the callback is called. ------------------------------------------------------------------------ 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/22713 -- Edit this bug report at http://bugs.php.net/?id=22713&edit=1