Start/Stop Service from program php

From: Date: Sun, 27 Jul 2008 04:02:39 +0000
Subject: Start/Stop Service from program php
Groups: php.general 
Request: Send a blank email to php-general+get-277367@lists.php.net to get a copy of this message
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 ...

« previous php.general (#277367) next »