Hi all!
I have a dedicated windows server.
Everything is compiled as far as IIS, Mysql & php is concerned.
But, I have this problem: I call external program commands through php using shell_exec.
The thing is that php responds OK when it comes to 'dir' or 'cd', but, in another program,
not windows-native, there is no response.
The program is set up in the PATH, because, if I open a cmd shell, I can call it from everywhere and it works fine!
I have given full control permissions to IUSR for the external program I am trying to call as well as the cmd.exe.
Any ideas on why shell_exec is not working?
Running External Program Thru Shell Exec
18 days later
Are you sure it's not working? When you don't get output, it can mean that the command did not execute.
<?php
$output = shell_exec("mywincmd -o -whatever");
if(empty($output))
{
trigger_error("There was a problem executing your command, or it did not produce any output");
}
?>