<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic What to change in this program to make it works? in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/what-to-change-in-this-program-to-make-it-works/m-p/3653446#M20184</link>
    <description>Hi, &lt;BR /&gt;I prepered AMP (Asterisk Management Portal) and I got a web interface, and now I got a error message &lt;BR /&gt;&lt;BR /&gt;Warning: file(/etc/asterisk/voicemail.conf): failed to open stream: Permission denied in /var/www/recordings/includes/login.inc on line 48&lt;BR /&gt;&lt;BR /&gt;Warning: file(/etc/asterisk/sip_additional.conf): failed to open stream: No such file or directory in /var/www/recordings/includes/login.inc on line 86&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I opened above folder using &lt;BR /&gt;/var/www# cat -n recordings/includes/login.inc&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and part of source code is bellow&lt;BR /&gt; 34&lt;BR /&gt;    35      if (isset($_POST['username']) &amp;amp;&amp;amp;&lt;BR /&gt;    36            isset($_POST['password'])) {&lt;BR /&gt;    37        $username = $_POST['username'];&lt;BR /&gt;    38        $password = $_POST['password'];&lt;BR /&gt;    39      }&lt;BR /&gt;    40&lt;BR /&gt;    41      // when login, make a new session&lt;BR /&gt;    42      if ($username &amp;amp;&amp;amp; $password &amp;amp;&amp;amp; !$ari_no_login) {&lt;BR /&gt;    43&lt;BR /&gt;    44        $auth = false;&lt;BR /&gt;    45&lt;BR /&gt;    46        // check voicemail login&lt;BR /&gt;    47        if (!$auth) {&lt;BR /&gt;    48          $lines = file($asterisk_voicemail_conf);&lt;BR /&gt;    49          foreach ($lines as $key =&amp;gt; $line) {&lt;BR /&gt;    50&lt;BR /&gt;    51            unset($value);&lt;BR /&gt;    52            list($var,$value) = split('=&amp;gt;',$line);&lt;BR /&gt;    53            $var = trim($var);&lt;BR /&gt;    54            if ($var==$username &amp;amp;&amp;amp; $value) {&lt;BR /&gt;    55              $buf = split(',',$value);&lt;BR /&gt;    56              if ($buf[0]==$password) {&lt;BR /&gt;    57&lt;BR /&gt;    58                // authenticated&lt;BR /&gt;    59                $auth = true;&lt;BR /&gt;    60                $mailbox = $username ;&lt;BR /&gt;    61                $displayname = $buf[1];&lt;BR /&gt;    62&lt;BR /&gt;    63                $default_page = 'voicemail';&lt;BR /&gt;    64&lt;BR /&gt;    65                $admin_callmonitor = 0;&lt;BR /&gt;    66                if ($callmonitor_admin_mailboxes) {&lt;BR /&gt;    67                  $mailboxes = split(',',$callmonitor_admin_mailboxes);&lt;BR /&gt;    68                  foreach ($mailboxes as $key =&amp;gt; $value) {&lt;BR /&gt;    69                    if ($value=='all' || $mailbox==$value) {&lt;BR /&gt;    70                      $admin_callmonitor = 1;&lt;BR /&gt;    71                      break 2;&lt;BR /&gt;    72                    }&lt;BR /&gt;    73                  }&lt;BR /&gt;    74                }&lt;BR /&gt;    75              }&lt;BR /&gt;    76              else {&lt;BR /&gt;    77                $_SESSION['ari_error'] = "Incorrect Password";&lt;BR /&gt;    78                return;&lt;BR /&gt;    79              }&lt;BR /&gt;    80            }&lt;BR /&gt;    81          }&lt;BR /&gt;    82        }&lt;BR /&gt;    83&lt;BR /&gt;    84        // check sip login&lt;BR /&gt;    85        if (!$auth) {&lt;BR /&gt;    86          $lines = file($asterisk_sip_conf);&lt;BR /&gt;    87          foreach ($lines as $key =&amp;gt; $line) {&lt;BR /&gt;    88&lt;BR /&gt;    89            unset($value);&lt;BR /&gt;    90            list($var,$value) = split('=',$line);&lt;BR /&gt;    91            $var = trim($var);&lt;BR /&gt;    92            $value = trim($value);&lt;BR /&gt;    93            if ($var=="username") {&lt;BR /&gt;    94              $sip_username = $value;&lt;BR /&gt;    95            }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I do not know what to change unfortunateli I never before did something about php programs,&lt;BR /&gt;&lt;BR /&gt;does anybodi know what to change in order to solve this problem &lt;BR /&gt;&lt;BR /&gt;thank you</description>
    <pubDate>Thu, 20 Oct 2005 01:22:56 GMT</pubDate>
    <dc:creator>debian111</dc:creator>
    <dc:date>2005-10-20T01:22:56Z</dc:date>
    <item>
      <title>What to change in this program to make it works?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/what-to-change-in-this-program-to-make-it-works/m-p/3653446#M20184</link>
      <description>Hi, &lt;BR /&gt;I prepered AMP (Asterisk Management Portal) and I got a web interface, and now I got a error message &lt;BR /&gt;&lt;BR /&gt;Warning: file(/etc/asterisk/voicemail.conf): failed to open stream: Permission denied in /var/www/recordings/includes/login.inc on line 48&lt;BR /&gt;&lt;BR /&gt;Warning: file(/etc/asterisk/sip_additional.conf): failed to open stream: No such file or directory in /var/www/recordings/includes/login.inc on line 86&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I opened above folder using &lt;BR /&gt;/var/www# cat -n recordings/includes/login.inc&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and part of source code is bellow&lt;BR /&gt; 34&lt;BR /&gt;    35      if (isset($_POST['username']) &amp;amp;&amp;amp;&lt;BR /&gt;    36            isset($_POST['password'])) {&lt;BR /&gt;    37        $username = $_POST['username'];&lt;BR /&gt;    38        $password = $_POST['password'];&lt;BR /&gt;    39      }&lt;BR /&gt;    40&lt;BR /&gt;    41      // when login, make a new session&lt;BR /&gt;    42      if ($username &amp;amp;&amp;amp; $password &amp;amp;&amp;amp; !$ari_no_login) {&lt;BR /&gt;    43&lt;BR /&gt;    44        $auth = false;&lt;BR /&gt;    45&lt;BR /&gt;    46        // check voicemail login&lt;BR /&gt;    47        if (!$auth) {&lt;BR /&gt;    48          $lines = file($asterisk_voicemail_conf);&lt;BR /&gt;    49          foreach ($lines as $key =&amp;gt; $line) {&lt;BR /&gt;    50&lt;BR /&gt;    51            unset($value);&lt;BR /&gt;    52            list($var,$value) = split('=&amp;gt;',$line);&lt;BR /&gt;    53            $var = trim($var);&lt;BR /&gt;    54            if ($var==$username &amp;amp;&amp;amp; $value) {&lt;BR /&gt;    55              $buf = split(',',$value);&lt;BR /&gt;    56              if ($buf[0]==$password) {&lt;BR /&gt;    57&lt;BR /&gt;    58                // authenticated&lt;BR /&gt;    59                $auth = true;&lt;BR /&gt;    60                $mailbox = $username ;&lt;BR /&gt;    61                $displayname = $buf[1];&lt;BR /&gt;    62&lt;BR /&gt;    63                $default_page = 'voicemail';&lt;BR /&gt;    64&lt;BR /&gt;    65                $admin_callmonitor = 0;&lt;BR /&gt;    66                if ($callmonitor_admin_mailboxes) {&lt;BR /&gt;    67                  $mailboxes = split(',',$callmonitor_admin_mailboxes);&lt;BR /&gt;    68                  foreach ($mailboxes as $key =&amp;gt; $value) {&lt;BR /&gt;    69                    if ($value=='all' || $mailbox==$value) {&lt;BR /&gt;    70                      $admin_callmonitor = 1;&lt;BR /&gt;    71                      break 2;&lt;BR /&gt;    72                    }&lt;BR /&gt;    73                  }&lt;BR /&gt;    74                }&lt;BR /&gt;    75              }&lt;BR /&gt;    76              else {&lt;BR /&gt;    77                $_SESSION['ari_error'] = "Incorrect Password";&lt;BR /&gt;    78                return;&lt;BR /&gt;    79              }&lt;BR /&gt;    80            }&lt;BR /&gt;    81          }&lt;BR /&gt;    82        }&lt;BR /&gt;    83&lt;BR /&gt;    84        // check sip login&lt;BR /&gt;    85        if (!$auth) {&lt;BR /&gt;    86          $lines = file($asterisk_sip_conf);&lt;BR /&gt;    87          foreach ($lines as $key =&amp;gt; $line) {&lt;BR /&gt;    88&lt;BR /&gt;    89            unset($value);&lt;BR /&gt;    90            list($var,$value) = split('=',$line);&lt;BR /&gt;    91            $var = trim($var);&lt;BR /&gt;    92            $value = trim($value);&lt;BR /&gt;    93            if ($var=="username") {&lt;BR /&gt;    94              $sip_username = $value;&lt;BR /&gt;    95            }&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I do not know what to change unfortunateli I never before did something about php programs,&lt;BR /&gt;&lt;BR /&gt;does anybodi know what to change in order to solve this problem &lt;BR /&gt;&lt;BR /&gt;thank you</description>
      <pubDate>Thu, 20 Oct 2005 01:22:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/what-to-change-in-this-program-to-make-it-works/m-p/3653446#M20184</guid>
      <dc:creator>debian111</dc:creator>
      <dc:date>2005-10-20T01:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: What to change in this program to make it works?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/what-to-change-in-this-program-to-make-it-works/m-p/3653447#M20185</link>
      <description>I think, the error  message are quite useful:&lt;BR /&gt;&lt;BR /&gt;a. permission denied, pls. check the persmission on the file&lt;BR /&gt;&lt;BR /&gt;b. pls. check, if the file really exists&lt;BR /&gt;&lt;BR /&gt;regards Kalle</description>
      <pubDate>Thu, 20 Oct 2005 02:20:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/what-to-change-in-this-program-to-make-it-works/m-p/3653447#M20185</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2005-10-20T02:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: What to change in this program to make it works?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/what-to-change-in-this-program-to-make-it-works/m-p/3653448#M20186</link>
      <description>check the permission with ls -l. It must be apache:apache so that web server can able to change file contents. &lt;BR /&gt;&lt;BR /&gt; # chown apache:apache &lt;FILENAME which="" is="" getting="" errors=""&gt;&lt;BR /&gt;&lt;BR /&gt;hth.&lt;/FILENAME&gt;</description>
      <pubDate>Thu, 20 Oct 2005 03:10:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/what-to-change-in-this-program-to-make-it-works/m-p/3653448#M20186</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-10-20T03:10:16Z</dc:date>
    </item>
  </channel>
</rss>

