Re: Why [?php while (true) { sleep(5); } ?] dies on CLI?

From: Date: Thu, 11 Jun 2009 12:24:44 +0000
Subject: Re: Why [?php while (true) { sleep(5); } ?] dies on CLI?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-293926@lists.php.net to get a copy of this message
Ford, Mike wrote:
On 11 June 2009 12:00, Ashley Sheridan advised:
On Thu, 2009-06-11 at 10:47 +0000, Jean-Pierre Arneodo wrote:
Hi! I'm stuck. I don't understand why the php CLI dies after 3 hours in my script.
Any
idea to solve? Thanks PHP 5.2.9-0.dotdeb.2 with Suhosin-Patch 0.9.7 (cli) (built: Apr 7
2009
20:06:36) Linux ubuntu 2.6.24-19-server #1 SMP Wed Jun 18 14:44:47
UTC
2008 x86_64 GNU/Linux Conf [php.ini] max_execution_time=0 <?php while (true) {
        sleep(5);
}
The while loop will continue executing until its condition is false.
As
you've got a boolean true as the condition, it will never end.
I think he realises that. His question is why "never" equates to 3 hours in his environment.
Shouldn't be max execution time issue if he's running the CLI. Maybe account limits? Maybe the above snippet isn't what's really happening... I mean what purpose would the above script serve for 3 hours? Looks like it's been dumbed down for us dummies on the list. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP

« previous php.general (#293926) next »