Jump to content

Flush not flushing!


B0b

Recommended Posts

You should try setting...

output_buffering = Off

and using sleep (so you can see the delay). That should hopefully do it.

 

Edit: For setting the directive just for the one file, you would have to do it in .htaccess. The ini_set function can not modify output_buffering.

Link to comment
https://forums.phpfreaks.com/topic/193836-flush-not-flushing/#findComment-1020168
Share on other sites

Have you read the information in the flush() section of the php documentation?

 

You must also disable all of the buffering (including the buffering being done to accomplish compression) that the web server is doing.

 

Short-answer: web servers and browsers were never intended for output from a single http request to be sent this way.

Link to comment
https://forums.phpfreaks.com/topic/193836-flush-not-flushing/#findComment-1020210
Share on other sites

I got it to work with one of the posts in PHP documentation:

 

@apache_setenv('no-gzip', 1);
@ini_set('zlib.output_compression', 0);
@ini_set('implicit_flush', 1);
for ($i = 0; $i < ob_get_level(); $i++) { ob_end_flush(); }
ob_implicit_flush(1);

 

All that to be able to flush  8)

 

Thanks guys.

Link to comment
https://forums.phpfreaks.com/topic/193836-flush-not-flushing/#findComment-1020219
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.