homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

"Maximum execution time of 30 seconds exceeded ..."
How do I extend this / avoid this?

 7:46 pm on Dec 6, 2004 (gmt 0)

I'm working on a script that most certainly at times can take longer then 30 seconds to run.. so I need to either alter the hard-coded value, or if theres a command I can apply IN my script (instead of changing the hard-coded value) to get arround this.. that would be great.




 7:54 pm on Dec 6, 2004 (gmt 0)

If your server is not running in safe mode(doubtful), then you nay change the max execution setting with set_time_limit() [php.net].


 1:48 am on Dec 7, 2004 (gmt 0)

Hey thats exactly what I was looking for. Is it possible to customize the return message to suit my scripting needs?


 1:55 am on Dec 7, 2004 (gmt 0)

You could define your own error handling rules [php.net].


 2:25 am on Dec 7, 2004 (gmt 0)

If the script takes a long time to execute, perhaps the script can be broken down into smaller steps. Also, if the script is accessing a database you may look into optimizing the database. If it is the web host, look into using a server that is less crowded.


 3:45 am on Dec 7, 2004 (gmt 0)

Thank you for your comments sun818, but to respond, this script connects to no database. As well its run on an apache server on my computer.

The script itself is naturally time consuming (so any simplifiction would hardly scratch the surface), without going into great detail it preforms endless tests to confirm a value, and the longer the value the longer (by multiple folds) the time will require.

I'll look into that link coopster, at first glance I dont see what I'm looking for but I'll keep trying.


 4:08 am on Dec 7, 2004 (gmt 0)

You might try doing some php performace profiling [webmasterworld.com] to figure out where the bottlenecks are if it's not already clear.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved