Welcome! Log In Create A New Profile

Advanced

Re: SOS! Why Nginx DID NOT flush buffer to client?

Daniel Hahler
February 15, 2010 05:44AM
Hi,

> I want to the php file output 1 line per second.

take a look at the fastcgi buffer settings:
http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_buffers


Cheers,
Daniel

You wrote:
> see my code first:
>
> <?php
>    ob_implicit_flush(true);
>    for ($i = 0; $i < 5; $i++) {
>        echo "test $i";
>        sleep(1);
>    }
> ?>
>
> OR
>
> <?php
>    ob_end_clean();
>    for ($i = 0; $i < 5; $i++) {
>        echo "test $i";
>        flush();
>        sleep(1);
>    }
> ?>
>
> Both not work, they output all the content after 5 seconds. NOT 1 second 1 line.
>
> I tried to change nginx.conf
> gzip on; AND gzip off;
> and it still NOT 1 second 1 line.
>
> and I also tried to change php.ini
> output_buffering = 4096
> AND
> output_buffering = 0
> and it still NOT 1 second 1 line.
>
> HOW CAN I FIX IT ?
> SOS!!!

--
http://daniel.hahler.de/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

SOS! Why Nginx DID NOT flush buffer to client?

21andy February 09, 2010 03:29AM

Re: SOS! Why Nginx DID NOT flush buffer to client?

Georgi Hristozov February 09, 2010 11:10AM

Re: SOS! Why Nginx DID NOT flush buffer to client?

Rob Schultz February 09, 2010 11:56AM

Re: SOS! Why Nginx DID NOT flush buffer to client?

Tobia Conforto February 11, 2010 04:22AM

Re: SOS! Why Nginx DID NOT flush buffer to client?

Daniel Hahler February 15, 2010 05:44AM

Re: SOS! Why Nginx DID NOT flush buffer to client?

Rob Schultz February 15, 2010 12:42PM

Re: SOS! Why Nginx DID NOT flush buffer to client?

winux May 16, 2012 02:57AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 298
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready