tl;dr: Is it possible to feed some "dummy spaces" periodically back to the browser while waiting for a SQL query to execute? This to not have the browser hang up on me while nothing returns.
Longer story:
I've made a small "web tool" against a database (MS SQL, using their PDO driver).
Sometimes, the queries that I run take a long time.
After about 100 seconds, the browser just stops "rotating". I don't know yet what causes this, but it is the same with Firefox and Chrome. The stack is PHP 5.3, IIS 6, FastCGI. It is not PHP nor DB/SQLSRV timeout, as I've increased both of those - and other queries I have take a longer time to feed back all the result. (I can reproduce the problem by writing some header, chilling for 110 seconds, and then write the footer. Only the header-part is then shown.)
The problem with the present query, is that it doesn't feed back anything for about 200 seconds, then the whole thing comes. But this doesn't help when something along that stack have stopped listening/receiving/transmitting after about 100 seconds.
Thus, the question: Is it possible to trickle-feed the browser some dummy spaces while the script is waiting for the SQL to return? In my native tounge of Java, this would be trivial, but in PHP, one is AFAIK utterly single threaded (actually, "single process'd"). I know that this trickling would work, as I have other scripts that in total takes much longer, but which continually sends small pieces of the result back to the browser - this renders just fine.