Hi Chris
The script is not meant to run ping, I just used it as a test and then 
noticed that it does not time out as I would have expected. The problem 
is thus that if it is used on the command it is intended for and that 
command actually just keeps on going and going for whatever reason, I 
might end up with a problem where I expected PHP to take care of it for 

Chris Hewitt wrote:

> If I may respectfully suggest that you do not use the php scipt 
> timeout to limit the number of pings but ensure that the system 
> command will finish within the required time. The former seems a poor 
> technique to me.
> In your example, the ping command will never complete (unless php 
> closes it down). Why not limit the number of pings with "ping -c 10 
> Chris
> PHPCoder wrote:
>> HI
>> I wrote a basic script that takes the input of a textfield and passes 
>> it onto the system() function and then echo's the result, 
>> somethinglike this:
>> <?php
>> $result = system($command);
>> echo $result;
>> ?>
>> The $command is sent from the previous page via text field.
>> Whe I test this and do something like " ping", the page 
>> keeps on growing and growing, way past 30seconds. My php.ini file is 
>> definately set to 30s timeout. Is there something wrong or do I have 
>> a misunderstanding of the timeout workings?
>> Thanks
>> '

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

Reply via email to