HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: What to change in this program to make it work...
Operating System - Linux
1835543
Members
3070
Online
110078
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2005 06:22 PM
10-19-2005 06:22 PM
Hi,
I prepered AMP (Asterisk Management Portal) and I got a web interface, and now I got a error message
Warning: file(/etc/asterisk/voicemail.conf): failed to open stream: Permission denied in /var/www/recordings/includes/login.inc on line 48
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
I opened above folder using
/var/www# cat -n recordings/includes/login.inc
and part of source code is bellow
34
35 if (isset($_POST['username']) &&
36 isset($_POST['password'])) {
37 $username = $_POST['username'];
38 $password = $_POST['password'];
39 }
40
41 // when login, make a new session
42 if ($username && $password && !$ari_no_login) {
43
44 $auth = false;
45
46 // check voicemail login
47 if (!$auth) {
48 $lines = file($asterisk_voicemail_conf);
49 foreach ($lines as $key => $line) {
50
51 unset($value);
52 list($var,$value) = split('=>',$line);
53 $var = trim($var);
54 if ($var==$username && $value) {
55 $buf = split(',',$value);
56 if ($buf[0]==$password) {
57
58 // authenticated
59 $auth = true;
60 $mailbox = $username ;
61 $displayname = $buf[1];
62
63 $default_page = 'voicemail';
64
65 $admin_callmonitor = 0;
66 if ($callmonitor_admin_mailboxes) {
67 $mailboxes = split(',',$callmonitor_admin_mailboxes);
68 foreach ($mailboxes as $key => $value) {
69 if ($value=='all' || $mailbox==$value) {
70 $admin_callmonitor = 1;
71 break 2;
72 }
73 }
74 }
75 }
76 else {
77 $_SESSION['ari_error'] = "Incorrect Password";
78 return;
79 }
80 }
81 }
82 }
83
84 // check sip login
85 if (!$auth) {
86 $lines = file($asterisk_sip_conf);
87 foreach ($lines as $key => $line) {
88
89 unset($value);
90 list($var,$value) = split('=',$line);
91 $var = trim($var);
92 $value = trim($value);
93 if ($var=="username") {
94 $sip_username = $value;
95 }
I do not know what to change unfortunateli I never before did something about php programs,
does anybodi know what to change in order to solve this problem
thank you
I prepered AMP (Asterisk Management Portal) and I got a web interface, and now I got a error message
Warning: file(/etc/asterisk/voicemail.conf): failed to open stream: Permission denied in /var/www/recordings/includes/login.inc on line 48
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
I opened above folder using
/var/www# cat -n recordings/includes/login.inc
and part of source code is bellow
34
35 if (isset($_POST['username']) &&
36 isset($_POST['password'])) {
37 $username = $_POST['username'];
38 $password = $_POST['password'];
39 }
40
41 // when login, make a new session
42 if ($username && $password && !$ari_no_login) {
43
44 $auth = false;
45
46 // check voicemail login
47 if (!$auth) {
48 $lines = file($asterisk_voicemail_conf);
49 foreach ($lines as $key => $line) {
50
51 unset($value);
52 list($var,$value) = split('=>',$line);
53 $var = trim($var);
54 if ($var==$username && $value) {
55 $buf = split(',',$value);
56 if ($buf[0]==$password) {
57
58 // authenticated
59 $auth = true;
60 $mailbox = $username ;
61 $displayname = $buf[1];
62
63 $default_page = 'voicemail';
64
65 $admin_callmonitor = 0;
66 if ($callmonitor_admin_mailboxes) {
67 $mailboxes = split(',',$callmonitor_admin_mailboxes);
68 foreach ($mailboxes as $key => $value) {
69 if ($value=='all' || $mailbox==$value) {
70 $admin_callmonitor = 1;
71 break 2;
72 }
73 }
74 }
75 }
76 else {
77 $_SESSION['ari_error'] = "Incorrect Password";
78 return;
79 }
80 }
81 }
82 }
83
84 // check sip login
85 if (!$auth) {
86 $lines = file($asterisk_sip_conf);
87 foreach ($lines as $key => $line) {
88
89 unset($value);
90 list($var,$value) = split('=',$line);
91 $var = trim($var);
92 $value = trim($value);
93 if ($var=="username") {
94 $sip_username = $value;
95 }
I do not know what to change unfortunateli I never before did something about php programs,
does anybodi know what to change in order to solve this problem
thank you
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2005 07:20 PM
10-19-2005 07:20 PM
Re: What to change in this program to make it works?
I think, the error message are quite useful:
a. permission denied, pls. check the persmission on the file
b. pls. check, if the file really exists
regards Kalle
a. permission denied, pls. check the persmission on the file
b. pls. check, if the file really exists
regards Kalle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2005 08:10 PM
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP