Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-23-2005, 01:44 AM   #1
Registered: Nov 2005
Location: Ohio
Distribution: SuSE
Posts: 34

Rep: Reputation: 15
Post 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
Old 12-23-2005, 02:05 AM   #2
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[PHP] Sending shell commands from PHP pEeDy Programming 4 11-04-2005 08:06 PM
PHP -- How to execute a shell script from PHP using FTP functions?? zoonalex Programming 3 07-29-2004 11:51 AM
shell commands! krishlinux General 1 10-05-2003 04:47 AM
PHP to run Shell commands Gear_freak2000 Linux - Software 4 06-04-2003 05:39 AM
how to delete old shell commands a_hic Linux - Newbie 4 05-01-2003 06:16 AM

All times are GMT -5. The time now is 01:02 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration