Local test Server Configuration
Posted: Tue Apr 15, 2008 9:14 pm
Echo exec($cmd); wont run on my local test server
I need some guidance please. I am building a local test server to run an application which will launch an .exe file. My initial testing was done on WOSX (Webserver On a Stick http://www.chsoftware.net/en/products/wosx/wosx.htm ) and it worked fine. I used the following code to launch the file:
<?php
$cmd = '"c:\\ Program Files\\Adobe\\Reader 8.0\\Reader\\AcroRd32.exe"';
Echo exec($cmd);
?>
I also tried:
$cmd = '"c:\\ Program Files\\Adobe\\Reader 8.0\\Reader\\AcroRd32.exe"';
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run($cmd, 7, false);
which also works
I have now built my test server running Apache_2.2.8-win32 and php-5.2.5-win32 but I can’t get the code to open the cmd window. I have spent all day trying to solve the problem but no joy. The problem is definitely in how I have configured the server because the code works when I run it on WOSX but not on my new server. If anyone has any suggestions on what I am doing wrong I’m all ears.
P.S. I tried this on Windows 2003 server and then on Win XP pro sp2
Thanks
Nick
I need some guidance please. I am building a local test server to run an application which will launch an .exe file. My initial testing was done on WOSX (Webserver On a Stick http://www.chsoftware.net/en/products/wosx/wosx.htm ) and it worked fine. I used the following code to launch the file:
<?php
$cmd = '"c:\\ Program Files\\Adobe\\Reader 8.0\\Reader\\AcroRd32.exe"';
Echo exec($cmd);
?>
I also tried:
$cmd = '"c:\\ Program Files\\Adobe\\Reader 8.0\\Reader\\AcroRd32.exe"';
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run($cmd, 7, false);
which also works
I have now built my test server running Apache_2.2.8-win32 and php-5.2.5-win32 but I can’t get the code to open the cmd window. I have spent all day trying to solve the problem but no joy. The problem is definitely in how I have configured the server because the code works when I run it on WOSX but not on my new server. If anyone has any suggestions on what I am doing wrong I’m all ears.
P.S. I tried this on Windows 2003 server and then on Win XP pro sp2
Thanks
Nick