mlat Posted September 20, 2006 Share Posted September 20, 2006 I'm having trouble with the exec command (its a vps windows server). I use the code exec("start /b \"C:\path_to\program.exe\"");I run 3 command line programs using that same piece of code, and it seems to work perfectly fine. When I get to a normal windows program I have to run, it wont run. I even tried a bat file but that doesn't work either. The php script just is stuck at load unless I take that program out. Any suggestions? Quote Link to comment Share on other sites More sharing options...
zq29 Posted September 21, 2006 Share Posted September 21, 2006 Is it throwing out any errors or other output if you include the output attribute?[code]<?phpexec("start /b \"C:\path\to\file.exe\"",$out);echo "<pre>",print_r($out),"</pre>";?>[/code] Quote Link to comment Share on other sites More sharing options...
mlat Posted September 21, 2006 Author Share Posted September 21, 2006 No, it literally freezes right when it gets to exec. I've tried other combinations and other functions, it just seems whenever I attempt to run that program with php, it doesn't work. Quote Link to comment Share on other sites More sharing options...
SephirGaine Posted September 21, 2006 Share Posted September 21, 2006 Unfortunately I'm not sure what's exactly wrong, but just for troubleshooting goodness, try with a different browser. If that doesn't work, try running the script on a different machine entirely. I'm sure it'll be easier to pin down what the problem is if you can figure out whether it's a problem with the code itself or a system/security/firewall problem. I can imagine a lot of things can prohibit programs from running remotely off of a script. Quote Link to comment Share on other sites More sharing options...
mlat Posted September 21, 2006 Author Share Posted September 21, 2006 Well, I'll tell you what I know.I can't run this program on any other server besides the one I have and my own computer. It works on my own computer, and the program works fine when i run it myself on the server. However, whenever I try to run it by script from the server, either by local host or accessing it from my own computer, it doesn't work. I have even tried to run a bat file which runs that program. No success. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.