Forum Moderators: coopster
Regardless of where I put the script, when executed, it always lists the contents of the
directory where it is placed, rather than the contents of some_directory. In other words, it appears that cd is not working. I have verified that path and permissions are correct. PHP is version 4.3.9. What's wrong?
Tuan.
$test_cmd1 = "command";
$test_res1 = shell_exec($test_cmd1);
echo $test_res1;
if I use as "command" somethink like "ls", "pwd", it works ok. However, if I use a custom command, (full path) nothing happens. However, if I log on as
a different user (to make sure permissions are OK) and type in the terminal the command (full path), it works OK. I have this problem only on one server, so I assume there is a configuration problem? The command can be as simple as a file containing the line echo "hello"
Tuan.