Jump to content

No output being sent until function has finished


agravayne

Recommended Posts

Hello,

 

Thi is a difficult one to explain but what we basically have a a very convoluted set of functions that call each one after the other and create an object and return that to a further script that then displays a map made from the variables returned wich is printed into an IFRAME. This can sometimes take some time as it has to retreive a lot a variables.

 

What I am trying to do is get some feedback as the scripts is running so the user has something reason why the page is taking so long.

 

I have various print commands through out the scripts, loops and functions. No matter where they are the output is only sent to the screen after all the functions are called and the resulting object is returned. This is true even if I put in a simple print command before the first function is called.

 

Has anyone got any ideas what might be happening.

 

Many thanks

Scott

Yeah I guessed it was to do with this but no changes I am making in this are working. For example after each print statement I have tried ob_flush(); but that still has no effect. I think that even the ob_flush command is not running until the function is finished?

Compression (such as mod_gzip or zlib.output_compression) will buffer output, even if php is not buffering it.  Even if you have zlib output compression enabled in the config but disable it at runtime, your output will STILL be buffered.

 

You might want to try ob_implicit_flush() if you haven't already..

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.