Page 1 of 1
Restart httpd and named via PHP (without suexec/as nobody)
Posted: Thu Nov 09, 2006 3:16 pm
by amir
I need to restart both BIND and Apache from a PHP script that's running as nobody. The following two lines don't work:
Code: Select all
echo `/usr/sbin/httpd restart`;
echo `/etc/rc.d/init.d/named restart`;
Anyone?
Re: Restart httpd and named via PHP (without suexec/as nobod
Posted: Thu Nov 09, 2006 4:06 pm
by Chris Corbyn
amir wrote:I need to restart both BIND and Apache from a PHP script that's running as nobody. The following two lines don't work:
Code: Select all
echo `/usr/sbin/httpd restart`;
echo `/etc/rc.d/init.d/named restart`;
Anyone?
You need root to do that. No two ways about it sorry.
Posted: Fri Nov 10, 2006 12:48 am
by timvw
Why would you want to restart Apache? Most httpds i know have an option that allows you to reload (meaning: keep running, but reload the configuration file).
I have even more troubble seeing why you would want to restart Bind. Checkout the remote name daemon control (rndc).