Thanks to a great answer in http://phpbuilder.com/board/showthread.php?&t=10306202
I've been using it for a while now. At the time Everything seemed fine.
However I'm now having problems. I'm not sure when it broke as we've had a number of upgrades both on the servers and on the user's local machine.
Anyway to summarize I'm using the JavaScript progress bar which nemonoman suggested (http://www.dynamicdrive.com/dynamicindex11/xpprogressbar.htm)
My code looks like this
$display_block1 = "code for the JavaScript progress bar";
$display_block2 = "code to turn off the bar";
echo "Something";
echo $display_block;
ob_flush();
flush();
system($cmd)
echo "Another something";
echo $display_block2;
ob_flush();
flush();
sleep(20);
echo "Text after first sleep";
sleep(20);
echo "Text after 2nd sleep";
What seems to be happening is that it will display the first echo line, but it will wait until the script is finished before displaying anything else including the progress bar.
Is there someway I can be sure it is being flushed out to the browser?
This is on RHEL3 and Apache 2.0.46.
The problem seems to occur on all browsers I have access to (IE, Firefox on Win, Mozilla on RH). Could this mean I have PHP and Apache configured wrong?