[nycphp-talk] PHP-CLI Timeout
Hans Zaunere
hans at nyphp.com
Tue Dec 28 10:09:12 EST 2004
> > 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).
Also, if this is a 4.3.x version of PHP, and it's truly compiled as a
CLI (not a CGI) an execution time limit doesn't exist.
---
Hans Zaunere
President, Founder
New York PHP
http://www.nyphp.org
More information about the talk
mailing list