<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span class=value><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>I am trying to use PHP to reload the extensions in an
Asterisk installation. I keep getting this error:</span></font></span><br>
<br>
<span class=value>Unable to connect to remote asterisk (does
/var/run/asterisk.ctl exist?) when I run the script by visiting the URL;
however, if I run the script from the command line, it runs just fine (works
perfect, actually).</span><br>
<br>
<span class=value>I think it is permissions related. Does anyone have any
ideas?</span><br>
<br>
<span class=value>&lt;php</span><br>
<span class=value>&nbsp; &nbsp; &nbsp; &nbsp; $output = shell_exec('asterisk
-rx&quot;extensions reload&quot;');</span><br>
<span class=value>&nbsp; &nbsp; &nbsp; &nbsp; echo $output;</span><br>
<span class=value>?&gt;</span><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Yours,</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Michael Munger, dCAP</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>404-438-2128</span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><a href="mailto:michael@highpoweredhelp.com">michael@highpoweredhelp.com</a></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>