|
Posted by black francis on 10/24/05 17:31
hello all,
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:
<?php
....
$output = shell_exec("/usr/sbin/httpd -k restart");
exit;
?>
(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 regards,
cristián.
[Back to original message]
|