[nycphp-talk] PHP-CLI Timeout
Scott Mattocks
scott at crisscott.com
Tue Dec 28 09:59:32 EST 2004
Chris Bielanski wrote:
> I'm trying to parse a number of large webserver logs into a DB and I would
> prefer to use PHP as its our shop's lingua franca. How do I keep PHP from
> timing out the script after 30 seconds (or whatever I use in set_timeout())?
> Is there a method for running a script on the command line that doesn't
> terminate like this?
set_time_limit(-1);
// http://us2.php.net/manual/en/function.set-time-limit.php
// http://us2.php.net/manual/en/ref.info.php#ini.max-execution-time
This will let the script run indefinately depending on your system
settings (max_execution_time).
--
Scott Mattocks
More information about the talk
mailing list