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