![]() |
|
|
|
|
1
21st November 06:30
External User
Posts: 1
|
In the /var/log/secure i can see
"sudo: apache : sorry, you must have a tty to run sudo; TTY:unknown...." So, i edit line and comment in visudo to next ### Default requiretty And, eureka, work fine from a web page Thanks all ---------------------------- Mensaje original ---------------------------- Asunto: Start/Stop Service from program php De: opc@orenses.com Fecha: Sab, 26 de Julio de 2008, 11:02 pm Para: php-general@lists.php.net -------------------------------------------------------------------------- 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 ... +--------------------- Ing. Oswaldo Peñaloza C. EMPSETEL CIA. LTDA. - ORENSES.COM Proveedor Autorizado de Servicios de Internet Recaudación y Ventas: 9 de Mayo # 2011 e/ BolÃ*var y Pichincha Tlf. 07-2923-958 Nodo: 5ta Norte # 509 e/ Buenavista y Colón Tlf. 07-2922-396 Soporte Técnico: 093-310-310 Machala - Ecuador |
|
|
|
| Some other forums that might be of your interest : Php 5 forum, Apache forum, Iis forum, Functions forum, Classes forum, Librarys forum, Bugs forum, Postgres forum, Mysql forum, Paradox forum, Ms sql forum, Configurations forum, Php.ini forum, Problems forum, Scripting forum, Css forum, General forums, Off-topic talk, Links, Extra forums, Php |