I am trying to develop a server administration page so that I can restart httpd, named, proftpd, mysql, and mail servers from my webpage using php. I started with httpd when I enter the following command from a linux command line, works just fine.
service restart httpd
But when I try and use the following code in my php page
PHP Code:
<?php
$results = exec('service restart httpd');
echo $results;
?>
It fails every time. Some basic commands work, like listing file contents of directorys and such, but not restarting httpd, named, or proftpd.
Please help!