|
Posted by Tim Roberts on 10/25/05 09:30
"black francis" <cristian.melendez@gmail.com> wrote:
>
>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
>...
Yes, but your shell_exec isn't calling sudo. Did you intend to?
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
Navigation:
[Reply to this message]
|