I am trying to run the following PHP code on a Windows Server 2003 with II6 running php as isapi to convert pdfs to swfs.
echo "This is a test<br><Br>";
$software_path ="C:\\SWFTools\pdf2swf.exe" ;
$pdf_path ="D:\\Book\DMC\php\Test\PDF\\1.pdf" ;
$argument = "-o";
$swf_output ="D:\Book\DMC\php\Test\SWF\\1.swf" ;
$cmd =" $software_path $pdf_path $argument $swf_output";
$WshShell = new COM("WScript.Shell") or die("Could not start WScript");
$oExec = $WshShell->Run("cmd /C $cmd ", 0, false);
I receive a 500 error when running the code. When I comment out
//$oExec = $WshShell->Run("cmd /C $cmd ", 0, false);
the code will run without the error, but of course the command is not exicuted.
$cmd echos to:
.pdf -o D:\Book\DMC\php\Test\SWF\1
which does work perfecty in the command prompt.
I have tried other sample codes as well that try to run from the cmd promt, and get a 500 error. I have never needed to interface with the cmd propt with php before so I am not familiar with the requirements.
I did try to give IUSR read / write permissions on the server, but this did not solve the issue.
Thanks for the help.