From: Jough D. <jou...@gm...> - 2008-08-26 00:43:20
|
Not that the previous answers won't work, but I'm wondering if just taking off the safeties that are in place to stop things like scripts that take a minute or two is really the Right Answer. A minute in PHP execution is a LONG time. Is what the script is doing really that intensive, or are you just executing the same operations many times (e.g. if you were writing a spider that would request thousands of web pages)? Even then, you should be careful that your script isn't doing Bad Things or capitalizing things Inappropriately. Regardless, I'd suggest setting max_execution_time to a higher value, but not "0" which means your script just runs and runs and runs. Also, setting the php.ini directive means that all PHP scripts will run up until that max execution time, which also may not be what the doctor ordered. You can use the set_time_limit(int) function instead: http://us.php.net/manual/en/function.set-time-limit.php And you get the added benefit of having it reset every time it's called, which is really helpful if you use it in a loop where it resets the counter per iteration, but doesn't stop the script from timing out when it is doing something Bad. My $.02 (USD, now worth much less than it used to be). -- Jough On Mon, Aug 25, 2008 at 6:39 PM, Neil Rest <Nei...@rc...> wrote: > Bingo! > > max_execution_time did it. > > Thank you Pete, thank you Wilfried. |