RE: [PEAR] DB runs out of time
| From: | Mike Carter | Date: | Thu, 25 Sep 2003 14:55:21 +0000 |
| Subject: | RE: [PEAR] DB runs out of time | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-8042@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Gerd Terlutter [mailto:gerd@MplusB.de]
>
> Hi list,
> i've to insert/update two tables with data out of a file,
> file size is
> sometimes 1MB. Today my script runs out of execution-time,
> but it's not
> set in php.ini or httpd.conf (i think so). I get following message:
>
> Fatal error: Maximum execution time of 30 seconds exceeded in
> /usr/share/pear/DB/mysql.php on line 223
You can explicitly set the timeout on a script-by-script basis using the
PHP function
void set_time_limit ( int seconds)
http://uk2.php.net/manual/en/function.set-time-limit.php
If your query time varies you could set seconds = 0. However if your
script runs off for hours it could drag down the server if it is
executed multiple times.
Use wisely.
Regards,
Mike C.
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________