Re: Question about set_time_out and shell_exec

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

 



On Wed, May 24, 2006 11:26 am, Suhas wrote:
> I am trying to write a script which will avoid browser timeout problem
> and
> in that process I have created 2 files
>
> FILE1.php:
> set_time_out(1);
> echo shell_exec("/usr/local/bin/php -f FILE2.php &");
>
> FILE2.php:
> @mail($to,$sub,$msg);
> sleep(60);
> @mail($to,$sub,$msg);
>
> I run File1.php thr' browser and I get 2 emails 1 min apart. But
> browser
> does not timeout and PHP also does not throw error about timeout even
> if I
> have specified time limit to 1sec.
>
> Is there any explanation to this behaviour?

PHP time only counts stuff PHP is actually doing.

If you have a PHP script that executes a 5-minute SQL query, PHP
doesn't count *ANY* of that 5 minutes for its timeout limit.

Ditto for exec and friends.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
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