It’s really weird, I just changed server last week and I have a large script that process lots of information (personal script).
What it does it add stuff to the database with a foreach and then echo where it is (ex: “ID #27 was processed”) and so on until its done. With the old server, I would see this “echo” script run one by one but with my new server, it shows a blank page with the hourglass until it’s loaded/done.
Is there a config on the server or PHP that can show me the page as it is constructed?
Thanks
If you have access to the
php.ini, you can setoutput_buffering = Offto disable this behavior entirely. Otherwise, useflush()as suggested by others.I believe the default setting for
output_bufferingis4096. If the new server is set much higher, you might also try simply lowering it rather than turning it off to achieve similar behavior to your old server without losing buffering entirely.EDIT According to PHP docs, Apache
mod_gzipmay do its own output buffering which preventsflush()from working.