There is a script that connects in a cycle with different DBMS servers (the DBMS are NOT in the local network, because there are GREAT delays). The cycle consists of 48 DBMS servers. On each DBMS, some queries are executed. Query results, displayed in a single table HTML page.

The output of the page is like "parts". That is, the Apache Web server starts to produce a page when the php script has not fully processed all the database servers. Are there any settings to regulate such output in either Apache or php? AND

As I understand it, you need to look at directives in php.ini

output_buffering = Off implicit_flush = Off 

and using the flush(),ob_*() functions. I'm right?

    2 answers 2

    Maybe parallelize? Output the table immediately, and the scripts that are filled with cells with ajax-queries will add rows as data is received.

    How many independent databases do you have - so many sub-requests the page will execute. Or, if everything is interconnected, and you cannot show the entire table until all the data have been loaded, then again, save it in JS and render the table on the client when everything is received.

    • Thank. As an option, too, could come up, but more difficult to implement. I solved the problem with the flush () function. Just before, I have never come across such things and did not even guess that you can control the output ... Shl and the new browsers can draw the table immediately, without waiting for the closing </ table>. To do this, you need to specify the width of the fields in the first line .... and something else)) - YGOR-CHAMIN

    Quote :
    "And by calling the ob_implicit_flush function, we tell it that you need to print lines with echo immediately when they are output, and not after the page is fully loaded, as is done by default."

    Perhaps help.

    Ps Can it really enter the medal "On the footprint of the necroment" for the answer to a very old question?

    • @ YGOR-CHAMIN I answered only because @ HashCode sent you to RutCode. What's wrong with the trailer? A normal web programmer spends about 15% of the time on setup. - zenith
    • 1. Who ever talked about strangeness? And about the "old" was. 2. Oh, yes, I'm just a maniac on stuffing a respected, friends and likes. As if age is not the same. - zenith
    • @zenith answer, please, just very interesting, but why did you answer that question? I asked him 14 Aug 20:30, and that almost 2 months have passed! no, well, honestly, why? - YGOR-CHAMIN
    • one
      Because I could answer :) Honestly. - zenith
    • @zenith There is a revival sign, it is issued if an old question is answered with five votes in favor. This is an analogue of the proposed medal. - Nicolas Chabanovsky