lloydlester Posted October 3, 2007 Share Posted October 3, 2007 hi, i am developing a php web application where some programs requires a long time to process, such as going through a large table in a database and updating fields in each record. how can i do this without causing a page to timeout? thanks, lloyd ??? Quote Link to comment https://forums.phpfreaks.com/topic/71634-how-to-handle-long-process/ Share on other sites More sharing options...
jaymc Posted October 3, 2007 Share Posted October 3, 2007 ini_set(max_execution_time, 9999999999999999999); Quote Link to comment https://forums.phpfreaks.com/topic/71634-how-to-handle-long-process/#findComment-360646 Share on other sites More sharing options...
lloydlester Posted October 4, 2007 Author Share Posted October 4, 2007 Thanks a lot jaymc, by the way, is there a script (javascript or php) that i can use to display progress of the program, such as display the record number or the item number that it is processing. Quote Link to comment https://forums.phpfreaks.com/topic/71634-how-to-handle-long-process/#findComment-361320 Share on other sites More sharing options...
tcjohans Posted October 4, 2007 Share Posted October 4, 2007 I usually use set_time_limit(max number of seconds). The argument specifies the maximum execution time in seconds. If the argument is 0 you get unlimited execution time. Quote Link to comment https://forums.phpfreaks.com/topic/71634-how-to-handle-long-process/#findComment-361392 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.