Hello everyone,
I'm having a problem with exec() on a Windows server. I've read posts all around the web but nothing has helped. Safe mode is off on php.
I'm trying to call an exe in my Program Files. It works in the command prompt window but not through php. I've tried everything.
Here is my code:
$output = array();
$return_var = null;
$cmd =' "C:\Program Files\NCH Swift Sound\Switch\switch.exe" ';
exec($cmd, $output, $return);
print $return;
print $output;
This outputs: 0Array
and the Apache log gives the error 'C:\Program' is not recognized as an internal or external command etc.
I've tried varoius combinations of " " and \ to no effect. I may need to set up cmd.exe for IUSER but I'm not sure what this is.
Any help greatly appreciated - as I'm at a dead end,
Thanks
Mark