php flush() are not effective.

Olivier B. nginx.list at daevel.fr
Wed Apr 29 19:46:05 MSD 2009


Hi,

you probably have to reduce the NginX buffers : 
http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_buffers

Olivier

Ken Chen a écrit :
> Hi all,
>
> I am trying to flush content before the end of PHP script. With below 
> script, it works under lighttpd, but not work after changing to nginx.
>
> <?php
>
> ob_flush();
> echo "The first line<br />";
> flush();
> sleep(2);
>
> for ($i=10; $i>0; $i--)
> {
>     echo $i . "<br />";
> #    echo str_repeat(" ",8192);
>     ob_flush();
>     flush();
>     sleep(1);
> }
> ob_end_flush();
> ?>






More information about the nginx mailing list