# [EMAIL PROTECTED] / 2007-03-01 18:28:35 +0200:
> #/thepathtophp
> <?php
> 
> exec("ls -lrt", $stdout, $exitcode);
> 
> if($exitcode!=0) {
>             echo "Command ls -lrt could not be executed correctly. Exit code: 
> $exitcode\n";
> } else {
>             echo "Result:\n";
>             foreach($stdout AS $line) {
>                         echo $line."\n";
>             }
> }
> 
> ?>
> 
> 
> This code give the exit code -1 that is equal to that "ls -lrt" could not be
> executed. 

Does the daemon run chrooted somewhere?
What does $PATH contain?
What happens if you use /bin/ls?


-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

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

Reply via email to