Bikkebakke Posted July 15, 2010 Share Posted July 15, 2010 I need to make a webpage with a link/button (secured with a password) that (re)starts program(s) on the host computer. I have no idea where to start working on this and I failed to find any help by Googling so I'm now asking for help on forums. Basically the problem is, my friend is hosting a game server on a dedicated host, but for varying reasons the game server crashes every now and then (and usually it crashes just after my friend goes to sleep), so we have to wait untill my friend restarts the server. I recalled, one guy created a webpage where you could do the restarting without having to share the access to the host itself, so I recon I'll figure out how-to to help my friend but unfortunately searching for the solution wasn't as easy as I thought. Anyways, I hope someone could point me towards a solution so I could help my friend satisfy the addiction of a few hundred players by reducing the server downtime. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/207827-running-programs-remotely-from-a-webpage/ Share on other sites More sharing options...
trq Posted July 15, 2010 Share Posted July 15, 2010 You can execute commands using the exec family of functions providing you setup the correct permissions. ie: The Apache user will need permission to execute xyz command. Quote Link to comment https://forums.phpfreaks.com/topic/207827-running-programs-remotely-from-a-webpage/#findComment-1086412 Share on other sites More sharing options...
Bikkebakke Posted July 15, 2010 Author Share Posted July 15, 2010 Oh, okay thanks, I took a look at the exec() and how to set the privileges correctly, I hope we get it to work. I'll mark this as solved for now. Thanks again! *feels dumb* Quote Link to comment https://forums.phpfreaks.com/topic/207827-running-programs-remotely-from-a-webpage/#findComment-1086423 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.