How can I flush the OUTPUT BUFFER?


THE SCRIPT DOES NOT HAVE BUGS, I need to know how to set the parameters for the SERVER to FLUSH. My browser flushes okay. PLEASE HELP, IT IS URGENT !!

<?php ob_implicit_flush ( TRUE ); echo " START "; $id = 0; while ( $id < 5 ) { $id++; echo " $id"; sleep(2); ob_flush(); flush (); } ?>

Maybe it’s a problem caused by gzip compression on the server, try to disable it, for example, in .htaccess :

mod_gzip_on No

did that fix your problem?

I am having the same issue and I put that in my .htaccess and still I can’t get PHP to flush.

Er, actually, I just tried the php test and it didn’t work for me too :frowning: Disabling mod_gzip solved my problem with the output buffering in Perl…

I’ve also had no luck getting flush() or ob_flush() to work in PHP. I’ve tried disabling mod_gzip, but I think apache or zend is still caching or using “deflate” on the output. Seaching has turned up no other useful suggestions or demo code that actually works.

Any help would be greatly appreciated.