this is my first post and I would like to apologise in advance in case it's not worded or structured in the best way.
I am using Windows7 Home Premium with IIS 7.5 and PHP 5.3 I am executing the following code in php and it doesn't work. The exec command returns 1 and an empty array.
$path = "\\\\somecomputer\\somepath\\afolder";
chdir($path);
$cmd = "pushd $path";
exec("echo off & $cmd & \"c:/bfolder/somexecutable.exe\" -flag1 -flag2 \"$inputfile\" > outputfile.log", $retary, $retval);
print_r($reary);
print $retval;
However, if I do not chdir to a network path prior the exec call then everything works fine. It seems that when php cwd is set to a Network path any exec initiated from then on fails.
To sum up, I need c:\afolder\win32\pdftotext.exe to run from PHP using exec and read it's input file from a network-share and write its output but on a Windows Network Location.