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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jean-Pierre Arneodo wrote:
Ashley Sheridan a écrit :
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.

Thanks
Ash
www.ashleysheridan.co.uk
I don't want to stop, but the process dies.

I've tried the same loop with bash interpretor.
Same result, it seems to be a ubuntu problem, not a php problem.

Open up a shell... type the following into it:

ulimit -a

What do you see?

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux