ID:               21895
 Comment by:       a at a dot com
 Reported By:      haawk at acknet dot org
 Status:           No Feedback
 Bug Type:         Output Control
 Operating System: FreeBSD 4.7
 PHP Version:      4.3.0
 Assigned To:      helly
 New Comment:

just set "output_buffering = Off"


Previous Comments:
------------------------------------------------------------------------

[2003-05-01 20:38:46] [EMAIL PROTECTED]

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.



------------------------------------------------------------------------

[2003-04-26 09:55:11] [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



------------------------------------------------------------------------

[2003-02-06 06:02:49] [EMAIL PROTECTED]

Oops -- my bad -- didn't read enough of the report properly. I see I
seem to have explained what you already know.  Sorry!

------------------------------------------------------------------------

[2003-02-06 05:58:31] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

That script is working exactly as expected, and the call to ob_flush()
is exactly the expected solution.  implicit_flush has no relation to
ob_flush(), or output buffers in general.

There are indeed two layers of output buffering, but, slightly
confusingly, only one of them is called "output buffering" -- this is
the layer handled by the ob_*() functions. If output buffering is on, it
works like this:

output goes to (script's) output buffer (ob).

ob_flush() sends it to PHP's "connection" buffer.

flush() (or implicit_flush) sends connection buffer to browser.

If you want to use flush() or implicit_flush to send output to the
browser as it's produced, you'd be much better to turn output buffering
off.  (You could also take a look at ob_implicit_flush()
(http://www.php.net/manual/en/function.ob-implicit-flush.php), but it
seems to me this would be rather inefficient.)

------------------------------------------------------------------------

[2003-02-05 18:21:27] sthomas at townnews dot com

I think the key is this:

implicit_flush => On => Off

Is there a double internal pointer to this setting or something?  No
amount of setting implicit_flush will
make both of them true.

This script does not output as you'd expect:

<?PHP
ob_implicit_flush(1);

while (TRUE)
{
  echo ".\n";
  sleep(1);
}

?>

This should output a period every second on the CLI, but does not. 
Even putting a call to flush() in the while loop does nothing.  I was
able to get this to work by using ob_flush() oddly enough.

So essentially, flushing is completely broken unless you use ob_flush.

------------------------------------------------------------------------

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/21895

-- 
Edit this bug report at http://bugs.php.net/?id=21895&edit=1

Reply via email to