> when running a simple php script, below, with exec, I recieve:
> sh: /whoami: No such file or directory
> 
> <?php
> // outputs the username that owns the running php/httpd 
> process // (on a system with the "whoami" executable in the 
> path) echo exec('whoami'); ?>
> 

You may want to try using the full path to the whoami command. 

Try 

echo exec('/usr/bin/whoami'); 

Or wherever it sits on your machine.

If you don't know the user that PHP runs as, how do you know what it's PATH
variable is... 

-M

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

Reply via email to