Hello everyone,
Just to let anyone interested know how I got around my problem. I managed to find
information around different forums from previous posts that helped out.
To repeat, I'm running php with Apache 2 on Windows NT. I've been trying to call
an .exe from php.
I've modified this function by a guy called Jonah - posted at php.net:
<?php
function execInBackground($path, $exe, $additional) {
global $conf;
if (file_exists($path . $exe)) {
chdir($path);
if (substr(php_uname(), 0, 7) == "Windows"){
echo 'going Windows';
pclose(popen("start \"bla\" \"" . $exe . "\" " . $additional, "r")); } else {
exec("./" . $exe . " " . $additional . " > /dev/null &"); }
}
}
//-convert "C:\\mms2\\bells.amr" -format MP3 -outfolder "C:\\mms2"
execInBackground("C:\\Program Files\\NCH Swift Sound\\Switch\\", "switch.exe", '-convert c:\\mms2\\bells.amr - format MP3');
?>
I'm calling this with my arguments:
execInBackground("C:\\Program Files\\NCH Swift Sound\\Switch\\", "switch.exe", ' c:\\mms2\\bells.amr - format MP3');
And everything is thankfully working fine. Th method could be prettier but it works!
The earlier problem I had - see above, was related to setting permissions for local users to have access to the desktop.
Hope this helps someone,
Thanks
Mark