hi Shri,<br><br>Thanks a lot! It works.<br><br>I change the nginx configuration to:<br><br>fastcgi_buffer_size 4k;<br>gzip off;<br><br>And PHP script:<br><br><?php<br><br>ob_flush();<br>echo The first line<br />";<br>
flush();<br>sleep(2);<br><br>for ($i=10; $i>0; $i--)<br>{<br> echo $i . "<br />";<br> echo str_repeat(" ",4096);<br> ob_flush();<br> flush();<br> sleep(1);<br>}<br>ob_end_flush();<br>
?><br><br>But how do you implement them to the productive server? <br><br>Set 'zlib.output_compression = On' in php.ini, and only compress static content in nginx.conf ?<br><br><br>Regards,<br>Ken<br><br><div class="gmail_quote">
2009/4/29 Shri @ DevLib.Org <span dir="ltr"><<a href="mailto:shri@devlib.org">shri@devlib.org</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2">I've noticed this too. Can you retry after turning
gzip off? Worked in my case. </font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">We have some scripts which run for 20-30 mins,
rebuilding some large databases and they need to be run isolated from the main
webserver which has gzip on.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Regards,<br><font color="#888888">Shri</font></font></div><div><div></div><div class="h5">
<div><font face="Arial" size="2"></font> </div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">----- Original Message ----- </div>
<div style="background: rgb(228, 228, 228) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>From:</b>
<a title="ken73.chen@gmail.com" href="mailto:ken73.chen@gmail.com" target="_blank">Ken Chen</a>
</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="nginx@sysoev.ru" href="mailto:nginx@sysoev.ru" target="_blank">nginx@sysoev.ru</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b> Wednesday, April 29, 2009 11:20
PM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> php flush() are not
effective.</div>
<div><br></div>Hi all,<br><br>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. <br><br><?php<br><br>ob_flush();<br>echo "The first
line<br />";<br>flush();<br>sleep(2);<br><br>for ($i=10; $i>0;
$i--)<br>{<br> echo $i . "<br
/>";<br># echo str_repeat("
",8192);<br> ob_flush();<br>
flush();<br>
sleep(1);<br>}<br>ob_end_flush();<br>?><br></blockquote></div></div></div>
</blockquote></div><br>