Jump to content

Server Flush Problem


oconkero

Recommended Posts

OK here it is people, ive got a problem with the server. I dont know precisely as to which component its with... server configuration most likely. The problem is that i can output something on a page flush it with php to output that txt and then sleep and the output more text. and this script should do that, right?

 

<?php
echo("Sleeping for 3 seconds.");
flush();
sleep(3);
echo("Done.");
?>

 

But it does not do what it is ment to do, it instead of doing piece by piece loads all at once, but it takes well in this case 3 seconds to load... like if i goto the page it will be blank for 3 seconds then all of the text just pops up at once. Well i hope this is enough info for you all, and thanks in advance people, i know this is a wierd one.

 

-- "Human knowledge belongs to the world."

Link to comment
Share on other sites

Hey,

 

I am pretty new at this but i had the same thing the other day, I just added ob_flush(); before the normal flush and it works fine...

 

<?php

echo("Sleeping for 3 seconds.");

ob_flush();

flush();

sleep(3);

echo("Done.");

?>

 

Hold on, I will find the thing I read, cause it mentioned some config stuff you could do to change it too...

something about mod_gzip... Here you go

http://www.phpbuilder.com/board/showthread.php?t=10317119

 

Hope this helps.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.