Jump to content

Recommended Posts

Apparently my server times-out if the browser doesn't receive a response after 30 seconds - regardless of my php settings.

 

I am told that by sending one character to the browser can stop this time-out.

 

I am encoding video, so I do need a lengthy amount of time.

 

How would I do this so the script continues. Ie echo '<>'; I believe is only output when the script ends.

set_time_limit to prevent php from timing out the script.

 

To send one character to the screen:

 

$i=0;
while (condition is true) {
    if (($i % 300) == 0) {
        echo "<>";
        flush();
        ob_flush();
    }
    $i++;
}

 

That will only work in certain browsers, however.

 

flush; ob_flush;

Thanks premiso, any ideas which browsers it will not work on? (or which it will?)

 

I know it works in FF and IE6. Those are about the only ones I tested it on. I do not think it works on Chrome or Opera, unsure about Safari and IE > 6.

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.