pentan Posted October 10, 2006 Share Posted October 10, 2006 I'm using AJAX to feed data to a PHP program and that program has to do a fair bit of processing if the data stream is large. The connection seems to be timing out if I send large chuncks. How can I force the connection to remain open until the PHP program finishes executing the process? The process can take as long as two minutes.Thanks, Michael Quote Link to comment https://forums.phpfreaks.com/topic/23503-how-do-you-keep-an-ajax-connection-live/ Share on other sites More sharing options...
ToonMariner Posted October 10, 2006 Share Posted October 10, 2006 I suspect this is more of a php time out issue....something taking that long is NOT good for clients to stay on your site.you could always fork your scripts[url=http://www.phpfreaks.com/tutorials/71/0.php]http://www.phpfreaks.com/tutorials/71/0.php[/url] Quote Link to comment https://forums.phpfreaks.com/topic/23503-how-do-you-keep-an-ajax-connection-live/#findComment-106733 Share on other sites More sharing options...
ober Posted October 10, 2006 Share Posted October 10, 2006 I'd agree that this is a PHP timeout. You could try setting the timeout in the php.ini file if you have access to it or you could set it through code using set_ini().Alternatively, you could split the work up and send it to the server in chunks. Quote Link to comment https://forums.phpfreaks.com/topic/23503-how-do-you-keep-an-ajax-connection-live/#findComment-106773 Share on other sites More sharing options...
448191 Posted October 11, 2006 Share Posted October 11, 2006 Yes, you probably need to adjust php's time out limit.But, if your asking: how do I halt the browser untill the process is complete, use a [u]synchronous[/u] request. Not recommended BTW.But what in heavens sake are you doing that takes up to two minutes? That's madness. Quote Link to comment https://forums.phpfreaks.com/topic/23503-how-do-you-keep-an-ajax-connection-live/#findComment-107489 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.