niche Posted September 22, 2011 Share Posted September 22, 2011 is it possible to increase the maximum execution time? if so, how is that done> Link to comment Share on other sites More sharing options...
niche Posted September 22, 2011 Author Share Posted September 22, 2011 set_time_limit();http://php.net/manual/en/function.set-time-limit.php Link to comment Share on other sites More sharing options...
Ingolme Posted September 22, 2011 Share Posted September 22, 2011 You have to find the php.ini file on your server and change the max execution setting. I don't know the exact name of the parameter, but it should be pretty obvious when you see it. Link to comment Share on other sites More sharing options...
niche Posted September 22, 2011 Author Share Posted September 22, 2011 Though it's appropriate to use set_time_limit(); to extend the time limit for a specific script, right? Link to comment Share on other sites More sharing options...
ShadowMage Posted September 22, 2011 Share Posted September 22, 2011 There are situations when it's appropriate, yes. Say you have a really intensive script that requires 5 minutes to run. You wouldn't want to set the default time limit (the one you'd change if you set it in php.ini) to 5 minutes, so you use set_time_limit() within that script to set the time limit for just that script. EDIT: If you find yourself constantly overrunning the time limit, then you might consider upping the default set in php.ini though I think most setups keep it at about 60 seconds. I think it defaults to 30 seconds when you install PHP, which IMO is too short. Link to comment Share on other sites More sharing options...
Ingolme Posted September 22, 2011 Share Posted September 22, 2011 I see, that works, yes. I was still sending my response before I saw your other reply. Link to comment Share on other sites More sharing options...
niche Posted September 22, 2011 Author Share Posted September 22, 2011 Thanks for your help Ingolme and ShadowMage. Sounds like I'm on the right track. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.