php system command not showing window from Apache
Posted: 14. April 2011 19:25
Windows7, XAMPP 1.7.3, Apache running as limited user "Apache"
When i run from command line
php test.php
which has
<?PHP
$cmd = "C:\\xampp\\htdocs\AceWeb\\BatFiles\\AceNet\\LoadInvoicesIntoBMCWEB.BAT";
$rc = system("start $cmd");
?>
The CLI window opens up, allows me to interact with it for some user input, then when it exits, returns me to the calling CLI window.
From a browser
It starts a CMD.EXE (i can see it show up in Task Manager), but i can't get to it. Browser hangs waiting till i end the process with Task Manager.
How can i properly have a web user launch this interactive bat file?
Thanks for any help,
Steve
When i run from command line
php test.php
which has
<?PHP
$cmd = "C:\\xampp\\htdocs\AceWeb\\BatFiles\\AceNet\\LoadInvoicesIntoBMCWEB.BAT";
$rc = system("start $cmd");
?>
The CLI window opens up, allows me to interact with it for some user input, then when it exits, returns me to the calling CLI window.
From a browser
It starts a CMD.EXE (i can see it show up in Task Manager), but i can't get to it. Browser hangs waiting till i end the process with Task Manager.
How can i properly have a web user launch this interactive bat file?
Thanks for any help,
Steve