On Sat, 9 May 2009, Sam Hawkin wrote:

> I am trying to run the asterisk CLI commands from php.
>
> Some thing like "asterisk -rx reload".
>
> $command = "sudo asterisk -rx reload";
>
> $value1 = system($command,$retval1);

Without any output or error messages its hard to guess...

In what context is your PHP script executing?

1) As an AGI?

2) By you from a shell?

3) From cron?

There are (at least) 4 elements to consider:

1) Does your script have the execute permission set?

2) Does the executing process have a "clear path" to your script? (Do all 
of the directories in the path to your script allow the executing process 
to execute your script.)

3) Is /usr/sbin/ in the path of the executing process?

4) Is the user running the script authorized to run sudo with no password?

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      [email protected]      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to