I have to display continuous output from the php script. The script will remain in a loop of printing log data from the tool and sleeping. My issue is which i can't get PHP or Apache to output data prior to the script is finished.

I've attempted all of the instructions for eliminating the output buffer, and that i read with the config-files for PHP and Apache searching for some form of loading to disable.

Is possible related to Apache and PHP on Home windows, or must i consider another platform?

The easiest way (most dependable and clean) to do this is by using a server-side script which does the job, along with a client-side AJAX script that will poll another server-side script that will return the status. Within the web, information is buffered at different levels, to attain optimisation, and it is therefore hard to accomplish what you would like.

Begin using these eliminating the output buffer instructions you've used already, and toss in an HTML comment, 1024 bytes lengthy. Cause it's probably browser problem, not server.

Ahh, appears like you are searching for the COMET application


PHP's output_buffering setting is automatically (i.e. off), but you've without doubt looked into that.

I believe @Palantir's suggestion is most likely a high quality one: write the log records to some local file, after which offer that file (or parts thereof) towards the client the customer can re-request however frequently you would like. This has the benefit of not filling the browser's buffer (i.e. you should not just keep delivering log data towards the client ad infinitum).

But that wasn't your question.

Are you able to reproduce the output loading trouble with an easy script such as the following?

while (TRUE)
    echo 'x';