Is it possible to echo each time the loop is executed? For example:
foreach(range(1,9) as $n){ echo $n.\"\\n\"; sleep(1); }
Instead
Easy solution on nginx server:
fastcgi_keep_conn on; # < solution proxy_buffering off; gzip off;