homepage Welcome to WebmasterWorld Guest from 54.205.242.179
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
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?
Willis




msg:1311031
 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.

Thanks,
-Willis

 

Birdman




msg:1311032
 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].

Willis




msg:1311033
 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?

coopster




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

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

sun818




msg:1311035
 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.

Willis




msg:1311036
 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.

ergophobe




msg:1311037
 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.

Tom

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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved