[Asterisk-Users] Reload Asterisk from php or perl script

Justin B. Newman justin.newman at binhost.com
Fri Oct 8 06:54:02 MST 2004


On 10/8/2004, "Dee Lowndes" <dee at asyouneed.com> wrote:
>Hi,
>
>	I am looking for a basic script that can reload asterisk from
>php or perl via a web browser.
>
>I have tried exec( asterisk -rx reload ) and shell_exec( <same cmd> )
>with php but there seems to be a permission issue with asterisk that
>stops these working. I was just wondering if anyone has a way around
>this with perl or php.
>

Dee, 

If Asterisk is running as a different user than your web server, then you're
not going to be able to use those scripts "outta the box".  Running Asterisk
as the same user as your web server would probably be considered a horribly
insecure configuration, at best.

The alternative is to explore options for allowing your webserver to run
programs as different userid's.  If you're running Apache, this page may
help:
   http://httpd.apache.org/docs/suexec.html

Good luck!

Yours,

-jbn
Justin B Newman
BinFone Telecom
(Offering SIP and IAX termination and origination at http://www.binfone.com)



More information about the asterisk-users mailing list