Re: Start/Stop Service from program php

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Generally, apache runs as www-data.  What was the output of the command?

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com


I need write a script execute some command, but try start or stop service
like named, network this don't work

I edit visudo and add the next lines

User_Alias MYGROUP = apache, xyz


opc@xxxxxxxxxxx wrote:
> Hi
>
> I try execute unsucesfull the next code from web page
>
> <?php
> $cmd1 = shell_exec ("sudo /sbin/service named stop");
> echo "$cmd1";
> ?>
>
> I need write a script execute some command, but try start or stop service
> like named, network this don't work
>
> I edit visudo and add the next lines
>
> User_Alias MYGROUP = apache, xyz
> Cmnd_Alias MYCOMMAND = /sbin/service
> %MYGROUP ALL = MYCOMMAND
> %MYGROUP ALL=(ALL) NOPASSWD: ALL
>
> But don't work.
>
> Suggest? Thanks ...
>
>   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux