Jump to content

exec() wont run windows programs


mlat

Recommended Posts

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?
Link to comment
https://forums.phpfreaks.com/topic/21459-exec-wont-run-windows-programs/
Share on other sites

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.
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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.