johnsmith153 Posted May 14, 2009 Share Posted May 14, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/158140-how-is-a-simple-way-to-prevent-browser-timeout/ Share on other sites More sharing options...
w3evolutions Posted May 14, 2009 Share Posted May 14, 2009 I would look into FFMPEG, and something like Red5. Quote Link to comment https://forums.phpfreaks.com/topic/158140-how-is-a-simple-way-to-prevent-browser-timeout/#findComment-834177 Share on other sites More sharing options...
johnsmith153 Posted May 14, 2009 Author Share Posted May 14, 2009 Either I am a complete idiot, or you haven't read my question. Quote Link to comment https://forums.phpfreaks.com/topic/158140-how-is-a-simple-way-to-prevent-browser-timeout/#findComment-834179 Share on other sites More sharing options...
premiso Posted May 14, 2009 Share Posted May 14, 2009 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; Quote Link to comment https://forums.phpfreaks.com/topic/158140-how-is-a-simple-way-to-prevent-browser-timeout/#findComment-834182 Share on other sites More sharing options...
johnsmith153 Posted May 14, 2009 Author Share Posted May 14, 2009 Thanks premiso, any ideas which browsers it will not work on? (or which it will?) Quote Link to comment https://forums.phpfreaks.com/topic/158140-how-is-a-simple-way-to-prevent-browser-timeout/#findComment-834183 Share on other sites More sharing options...
JonnoTheDev Posted May 14, 2009 Share Posted May 14, 2009 There is a timeout you can set on the webserver. Apache httpd.conf Timeout xxx Quote Link to comment https://forums.phpfreaks.com/topic/158140-how-is-a-simple-way-to-prevent-browser-timeout/#findComment-834184 Share on other sites More sharing options...
premiso Posted May 14, 2009 Share Posted May 14, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/158140-how-is-a-simple-way-to-prevent-browser-timeout/#findComment-834188 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.