I'm trying to restart bind of my server using php
The commands I generally use with putty are:
service named restart
Both work fine.
When I used "any" of those commands with php like:
<?php echo shell_exec("/etc/init.d/named restart"); ?>
I get this output:
Starting named named: already running....[failed]
What am I missing here?
I also changed the owner and group of this php script using putty
chown root:root /home/site/rn.php
but it still does the same.
Is it possible to do this using a sh script? If so, please give me the code I need to use in the script. I don't know how to use sh scripts...