villermen Posted May 11, 2009 Share Posted May 11, 2009 I've made a script in php that acceses a database a lot of times.To complete the script, the page needs like 2 minutes.Something makes the page stop running the script after 30 seconds, where can I modify that? Link to comment Share on other sites More sharing options...
AElliott Posted May 11, 2009 Share Posted May 11, 2009 Alter max_execution_time in your server's php.ini, or if your user is allowed use http://php.net/set_time_limit to set it to something longer. Link to comment Share on other sites More sharing options...
villermen Posted May 11, 2009 Author Share Posted May 11, 2009 where should i place the set_time_limit() command? Link to comment Share on other sites More sharing options...
justsomeguy Posted May 11, 2009 Share Posted May 11, 2009 In the PHP script. The server might also have a timeout of 5 minutes, if you need to change that you'll need to change the Apache config files. Link to comment Share on other sites More sharing options...
Ingolme Posted May 12, 2009 Share Posted May 12, 2009 Are you sure you need to perform so many queries as to wait two minutes for them? Most people leave a page if it hasn't loaded in a few seconds. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 12, 2009 Share Posted May 12, 2009 There are plenty of systems that include reports that take several minutes to run. Not every site online is an informational site for public visitors. Link to comment Share on other sites More sharing options...
Synook Posted May 13, 2009 Share Posted May 13, 2009 Also, it could be a cron job or similar. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.