Reply to Re: Restart apache using PHP

Your name:

Reply:


Posted by Joe Estock on 10/24/05 19:30

black francis wrote:
> 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.
>
Have you tried apachectl?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация