Re: [PHP] [php] while loop failure

2009-04-06 Thread Virgilio Quilario
> setting:
>
> max_execution_time = -1     ; Maximum execution time of each script, in
> seconds
> max_input_time = -1    ; Maximum amount of time each script may spend
> parsing request data
> ;max_input_nesting_level = 64 ; Maximum input variable nesting level
> memory_limit = 2036M      ; Maximum amount of memory a script may consume
> (128MB)
>
> the above setting should allowed script to execute indefinitely. is't it?
>

hi,

should it be this setting that allows the script to run forever?
max_execution_time = 0;

also when script runs from command line, max_execution_time defaults to zero.

cheers,
virgil
http://www.jampmark.com

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



Re: [PHP] [php] while loop failure

2009-04-06 Thread Virgilio Quilario
> Does any one knows why while loop below ends after few loops when it meant
> to keep in loop?
>
> File name: while_loop_script.php
>
> define('run', 0);
> define('START', 10);
>
> while(START >run){
>
> $ch = curl_init("mydomain/update_script.php?action=run");
> curl_exec($ch);
> curl_close($ch);
>
> }
>
> using php.exe to scheldule task it every 5 minutes:
>
> C:\php.exe D:\update\while_loop_script.php
>
> --
> www.willandy.co.uk
>

hi,

maybe you should put
error_reporting(E_ALL);
ini_set('display_errors', true);

with the setting above, run the script
C:\php.exe D:\update\while_loop_script.php

you should see errors when script ends.

virgil
http://www.jampmark.com

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



Re: [PHP] [php] while loop failure

2009-04-06 Thread Andrew Williams
setting:

max_execution_time = -1 ; Maximum execution time of each script, in
seconds
max_input_time = -1; Maximum amount of time each script may spend
parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 2036M  ; Maximum amount of memory a script may consume
(128MB)

the above setting should allowed script to execute indefinitely. is't it?

On Mon, Apr 6, 2009 at 11:29 AM, Andrew Williams
wrote:

> The php.ini maximum time is set to -1 which is infinity
>
>
> On Mon, Apr 6, 2009 at 11:27 AM, Chetan Rane  > wrote:
>
>> I think its exceeding the max execution time set in PHP.ini
>> Either set yoru cron to run after every 60 seconds, or change the setting
>> in PHP.ini
>>
>> Chetan Dattaram Rane | Software Engineer | Persistent Systems
>> chetan_r...@persistent.co.in  | Cell: +91 94033 66714 | Tel: +91 (0832)
>> 30 79014
>> Innovation in software product design, development and delivery-
>> www.persistentsys.com
>>
>>
>>
>>
>> -Original Message-
>> From: Andrew Williams [mailto:andrew4willi...@gmail.com]
>> Sent: Monday, April 06, 2009 3:51 PM
>> To: php-general@lists.php.net
>> Subject: [PHP] [php] while loop failure
>>
>> Does any one knows why while loop below ends after few loops when it meant
>> to keep in loop?
>>
>> File name: while_loop_script.php
>>
>> define('run', 0);
>> define('START', 10);
>>
>> while(START >run){
>>
>> $ch = curl_init("mydomain/update_script.php?action=run");
>> curl_exec($ch);
>> curl_close($ch);
>>
>> }
>>
>> using php.exe to scheldule task it every 5 minutes:
>>
>> C:\php.exe D:\update\while_loop_script.php
>>
>> --
>> www.willandy.co.uk
>>
>> DISCLAIMER
>> ==
>> This e-mail may contain privileged and confidential information which is
>> the property of Persistent Systems Ltd. It is intended only for the use of
>> the individual or entity to which it is addressed. If you are not the
>> intended recipient, you are not authorized to read, retain, copy, print,
>> distribute or use this message. If you have received this communication in
>> error, please notify the sender and delete all copies of this message.
>> Persistent Systems Ltd. does not accept any liability for virus infected
>> mails.
>>
>
>
>
> --
> Best Wishes
> Andrew Williams
>
>
>


-- 
Best Wishes
Andrew Williams


Re: [PHP] [php] while loop failure

2009-04-06 Thread Andrew Williams
The php.ini maximum time is set to -1 which is infinity

On Mon, Apr 6, 2009 at 11:27 AM, Chetan Rane
wrote:

> I think its exceeding the max execution time set in PHP.ini
> Either set yoru cron to run after every 60 seconds, or change the setting
> in PHP.ini
>
> Chetan Dattaram Rane | Software Engineer | Persistent Systems
> chetan_r...@persistent.co.in  | Cell: +91 94033 66714 | Tel: +91 (0832) 30
> 79014
> Innovation in software product design, development and delivery-
> www.persistentsys.com
>
>
>
>
> -Original Message-
> From: Andrew Williams [mailto:andrew4willi...@gmail.com]
> Sent: Monday, April 06, 2009 3:51 PM
> To: php-general@lists.php.net
> Subject: [PHP] [php] while loop failure
>
> Does any one knows why while loop below ends after few loops when it meant
> to keep in loop?
>
> File name: while_loop_script.php
>
> define('run', 0);
> define('START', 10);
>
> while(START >run){
>
> $ch = curl_init("mydomain/update_script.php?action=run");
> curl_exec($ch);
> curl_close($ch);
>
> }
>
> using php.exe to scheldule task it every 5 minutes:
>
> C:\php.exe D:\update\while_loop_script.php
>
> --
> www.willandy.co.uk
>
> DISCLAIMER
> ==
> This e-mail may contain privileged and confidential information which is
> the property of Persistent Systems Ltd. It is intended only for the use of
> the individual or entity to which it is addressed. If you are not the
> intended recipient, you are not authorized to read, retain, copy, print,
> distribute or use this message. If you have received this communication in
> error, please notify the sender and delete all copies of this message.
> Persistent Systems Ltd. does not accept any liability for virus infected
> mails.
>



-- 
Best Wishes
Andrew Williams


RE: [PHP] [php] while loop failure

2009-04-06 Thread Chetan Rane
I think its exceeding the max execution time set in PHP.ini
Either set yoru cron to run after every 60 seconds, or change the setting in 
PHP.ini

Chetan Dattaram Rane | Software Engineer | Persistent Systems
chetan_r...@persistent.co.in  | Cell: +91 94033 66714 | Tel: +91 (0832) 30 79014
Innovation in software product design, development and delivery- 
www.persistentsys.com




-Original Message-
From: Andrew Williams [mailto:andrew4willi...@gmail.com]
Sent: Monday, April 06, 2009 3:51 PM
To: php-general@lists.php.net
Subject: [PHP] [php] while loop failure

Does any one knows why while loop below ends after few loops when it meant
to keep in loop?

File name: while_loop_script.php

define('run', 0);
define('START', 10);

while(START >run){

$ch = curl_init("mydomain/update_script.php?action=run");
curl_exec($ch);
curl_close($ch);

}

using php.exe to scheldule task it every 5 minutes:

C:\php.exe D:\update\while_loop_script.php

--
www.willandy.co.uk

DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.

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



[PHP] [php] while loop failure

2009-04-06 Thread Andrew Williams
Does any one knows why while loop below ends after few loops when it meant
to keep in loop?

File name: while_loop_script.php

define('run', 0);
define('START', 10);

while(START >run){

$ch = curl_init("mydomain/update_script.php?action=run");
curl_exec($ch);
curl_close($ch);

}

using php.exe to scheldule task it every 5 minutes:

C:\php.exe D:\update\while_loop_script.php

-- 
www.willandy.co.uk