Req #23877 [Com]: ob_implicit_flush does not work

From: Date: Thu, 08 Aug 2013 17:56:43 +0000
Subject: Req #23877 [Com]: ob_implicit_flush does not work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-180806@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=23877&edit=1

 ID:                 23877
 Comment by:         valentiny510 at yahoo dot es
 Reported by:        sthomas at townnews dot com
 Summary:            ob_implicit_flush does not work
 Status:             Not a bug
 Type:               Feature/Change Request
 Package:            CGI/CLI related
 Operating System:   Redhat Linux
 PHP Version:        4.3.2
 Assigned To:        mike
 Block user comment: N
 Private report:     N

 New Comment:

Aleluya Mike, Thank you... (just hope that sthomas did't died after all this time :)


Previous Comments:
------------------------------------------------------------------------
[2013-07-30 19:19:54] mike@php.net

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

"output call" does not refer to echo/print but to a call to the SAPI's module 
ub_write function.

------------------------------------------------------------------------
[2013-03-20 01:09:19] valentiny510 at yahoo dot es

Related To: Bug #64460

------------------------------------------------------------------------
[2009-11-11 22:59:19] haakon at avelia dot no

According to the manual:
"ob_implicit_flush() will turn implicit flushing on or off. Implicit flushing will result in a
flush operation after every output call, so that explicit calls to flush() will no longer be
needed."

This means that if I have registered a output-handler like this:

  function myhandler($str) {
    // handle $str internally
  }

  ob_start('myhandler');
  ob_implicit_flush(true);

Then according to the manual, each time I call "echo", "print" or output data
outside PHP tags; it should call the ob_handler callback.

This does not work in PHP CLI mode.

If this is not expected to work, the manual should be updated. But this is a feature i really need,
since i want to be able to let people write "print/echo" in their scripts, but my handler
should preprocess the data.

IMHO, it would have been really nice if this function worked as the documentation says. Either by
actually automatically firing flush() on each echo/print/etc, or by implicitly calling the callback
on each echo/print/etc.

------------------------------------------------------------------------
[2005-07-19 14:40:29] jeff at tillwicks dot us

I agree with sthomas totally on this.  I have been promised that there is a way to get the output
preformance of perl with php using output buffering and flush.  I use the cli version and have yet
to get it working once.  I have followed every example (copy and pasted exact) that is featured in
php's own documentation.  With every attempt all data is sent after the entire page has
finished loading.  It is just lack of support on this issue.

------------------------------------------------------------------------
[2004-07-22 11:16:48] everyone at example dot com

Look dude, you don't have to be so damn obnoxious about it. Be a bit more polite and you will
get a more favorable response.

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


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

    https://bugs.php.net/bug.php?id=23877


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


Thread (11 messages)

« previous php.bugs (#180806) next »