PHP timeout

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
redcircle
Forum Commoner
Posts: 43
Joined: Fri Jan 31, 2003 8:47 pm
Location: michigan, usa

PHP timeout

Post by redcircle »

I have a script that reads in a dir and makes thumbnails for them. The problem that I am having is that when processing more than 35 images the script gives a timeout error because it is taking longer than 30seconds to process the photos... anyone have a workaround? Like to temporarily set the timeout to like 3 minutes.
User avatar
lazy_yogi
Forum Contributor
Posts: 243
Joined: Fri Jan 24, 2003 3:27 am

Post by lazy_yogi »

http://www.php.net/manual/en/function.s ... -limit.php

from that page :


void set_time_limit (int seconds)

Set the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. The default limit is 30 seconds or, if it exists, the max_execution_time value defined in the configuration file. If seconds is set to zero, no time limit is imposed
User avatar
redcircle
Forum Commoner
Posts: 43
Joined: Fri Jan 31, 2003 8:47 pm
Location: michigan, usa

Post by redcircle »

I would have found it sooner but the search engine at php.net doesn't seem to be working..
User avatar
Stoker
Forum Regular
Posts: 782
Joined: Thu Jan 23, 2003 9:45 pm
Location: SWNY
Contact:

Post by Stoker »

You may want to download the PHP manual, the .CHM version is an excellent quick reference with searching capabilities..
Post Reply