<div dir="ltr">Did you check postpone_output?<div><br></div><div><a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#postpone_output">http://nginx.org/en/docs/http/ngx_http_core_module.html#postpone_output</a><br>
</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 12, 2014 at 10:41 AM, gaspy <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us" target="_blank">nginx-forum@nginx.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I know this has been asked before, but I could not find a definitive answer.<br>
I tried different solutions, nothing worked.<br>
<br>
I have a PHP script that has to do time intensive operations and provide a<br>
status update from time to time. No way around it.<br>
I built a sample PHP script:<br>
<?<br>
@ini_set('zlib.output_compression',0);<br>
@ini_set('implicit_flush',1);<br>
@ob_end_clean();<br>
ob_end_flush();<br>
$i=0;<br>
while($i<10)<br>
{<br>
        echo "$i\n";<br>
        ob_flush();<br>
        flush();<br>
        sleep(1);<br>
        $i++;<br>
}<br>
?><br>
<br>
I have output_buffering = Off in php.ini<br>
<br>
In nginx I have<br>
                location ~ \.php$<br>
                {<br>
                        try_files               $uri =404;<br>
                        fastcgi_pass    unix:/var/run/php5-fpm.sock;<br>
                        fastcgi_index   index.php;<br>
                        fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;<br>
                        include                 fastcgi_params;<br>
<br>
                        gzip off;<br>
                        proxy_buffering off;<br>
                        fastcgi_keep_conn on;<br>
                        fastcgi_buffers       128 1k;  # up to 1k + 128 * 1k<br>
                        fastcgi_max_temp_file_size 0;<br>
                        fastcgi_buffer_size   1k;<br>
                        fastcgi_buffering off;<br>
                }<br>
(yeah, I put everything and the kitchen sink)<br>
<br>
Server is Ubuntu 13.04, nginx 1.5.9, php 5.4.9<br>
<br>
Any ideas?<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,247451,247451#msg-247451" target="_blank">http://forum.nginx.org/read.php?2,247451,247451#msg-247451</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br></div>