|
Posted by Mike on 04/07/05 03:46
> 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
Navigation:
[Reply to this message]
|