Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Restart apache using PHP
- black francis
October 24, 2005, 2:31 pm
rate this thread
i`m trying to restart apache from php but have failed completely.
has anyone sucesfully done it?
i'm currently able to execute other unix commands from php adding the
proper permissions to the sudo file but apache refuses to restart.
here's the pseudo-script:
$output = shell_exec("/usr/sbin/httpd -k restart");
(i tried /etc/init.d/httpd too but got the same results)
here's the sudo file
apache ALL = NOPASSWD: /usr/bin/php, /usr/sbin/useradd,
/usr/sbin/chpasswd, /httpd/scr, /usr/sbin/httpd
i'm using RH-ES, PHP4, Apache2 & selinux turned off
- » Best approach to run queries only when user chooses
- — Previous thread in » PHP Scripting Forum