-   Linux - Software (
-   -   Running shell commands thru PHP (

JonathonReinhart 12-23-2005 02:44 AM

Running shell commands thru PHP
Hello everyone - I'm sure this has got to be possible, but everything i've tried fails to do what I'd like. I would like to have an admin console on my webserver (publicly-acessible) where I can login (with basic or MD5 authentication), and have a page with three options:

Reboot Server
Halt Server
Restart HoTTProxy

So I'd pretty much like to be able to run the commands, from the internet: 'reboot' 'halt' and '/etc/init.d/HoTTProxy restart'

How exactly do you go about doing this in php, and how can I verify that they are working (ie from the web page?)

Jonathon Reinhart

timmeke 12-23-2005 03:05 AM

Have you looked at the system() function in PhP?
It's described on

All times are GMT -5. The time now is 10:19 AM.