ID:               16676
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Won\'t fix
 Bug Type:         Output Control
 Operating System: Slackware 8.0
 PHP Version:      4.2.0
 New Comment:

Since current output buffer is statelss even if some buffers need
stateful handling to prevent crashes/malformed output/ etc.

Don't start buffer if you don't need it. Complain people who insisted
this behavior. Search php-dev archive ;)



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

[2003-01-10 12:32:43] [EMAIL PROTECTED]

Now I'm getting a PHP notice in Windows XP using PHP 4.3.0 from the cmd
line.

PHP Notice: ob_end_flush() [<a
href='http://www.php.net/ref.outcontrol'>ref.outcontrol</a>]: failed to
delete buffer default output handler. in C:\Apache\cgi-bin\mybot.php on
line 58

In previous versions, ob_end_flush was my workaround to
ob_implicit_flush not working. In 4.3.0 ob_end_flush isn't working for
me and it does work in 4.2.3. Could someone make at least one of the
two work again instead of keeping the "Won't fix" status?

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

[2002-12-27 08:35:57] [EMAIL PROTECTED]

Should have been won't fix

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

[2002-12-27 08:16:53] [EMAIL PROTECTED]

It is easy to make it actually flush output. Difficult part is make it
work always.

Some output buffers shouldn't be deleted and cannot be deleted. i.e.
Some browsers will freeze if server send malformed compressed output.
Thus ob_end_flush() wouldn't and shouldn't work in some cases. If it
works, it's a bug should be fixed.

Fix is simple, but you have to live with that.
If you are interested, search php-dev archive.

BTW, ob_implicit_flush() simply enable SAPI level auto flushing even if
its name imply PHP output buffer flushing. Don't blame me, I'm for
fixing it ;)





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

[2002-12-24 21:39:37] [EMAIL PROTECTED]

You can solve your problem by putting @ob_end_flush(); on top of your
command line scripts.

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

[2002-12-24 16:25:58] [EMAIL PROTECTED]

iliaa, I appreciate you trying to point me to help, but I still think
I'm right about this bug report. I've tried it on several machines with
each stable version of PHP since the report. Now still with 4.2.3 I'm
seeing the same thing. Again, I'm not using zlib output compression
cause I let mod_gzip do that in apache. This is for a php shell
script.

As you said, flush would send the output, but according to the
documentation, ob_implicit_flush() should "result in a flush operation
after every output call, so that explicit calls to flush() will no
longer be needed".

I'm saying ob_implicit_flush is broken in 4.2.x and does not call
flush() after each echo, or if it does, it's still not outputting to
STDOUT.

By default, php.ini has 4k of output buffering. I want to leave that
for the rest of the applications I'm running and since you can't modify
the ini value with ini_set(), I'm resorting to the ob_* functions.
Instead of calling ob_end_flush() at the start of the script cause
according to the docs on that, as part of its functionality, it turns
off ob.

Either way, I'm getting output buffering turned off while leaving 4k
buffering in php.ini, but I doesn't mean that ob_implicit_flush() might
still be not working right. I guess I'll just wait a few more days for
4.3.0 and try that out.

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

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

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

Reply via email to