exec() not working
Posted: Mon Jun 14, 2010 6:24 am
Hi,
Im trying to run the exec() function using the code:
This returns a blank array, and in the apache error logs show: "sh: /whoami: No such file or directory". Safe mode is off.
whoami works fine in the console, as does any other applicatons i try to run (i.e. ffmpeg), but both fail using exec().
If anyone has any ideas on how to get this working it would be much appreciated.
Thanks in advance.
Im trying to run the exec() function using the code:
Code: Select all
<?php
exec("whoami", $output);
print_r($output);
?>whoami works fine in the console, as does any other applicatons i try to run (i.e. ffmpeg), but both fail using exec().
If anyone has any ideas on how to get this working it would be much appreciated.
Thanks in advance.