[OpenSIPS-Users] Problem with OpenSIPS Control Panel 4.0

Christian Vo cvo at nvidia.com
Tue Mar 23 10:22:55 CET 2010


Based on this thread (http://www.pear-forum.org/topic1244.html)
, I added the following to  user_management.php
                $resultset = $link->prepare($sql);

##added this
                if (PEAR::isError($resultset)) {
                die($resultset->getMessage() . ', ' .  $resultset->getDebugInfo());
}
##

                $resultset->execute();


The error I got after trying to add user was this:

MDB2 Error: no such field, _doQuery: [Error message: Could not execute statement] [Last executed query: PREPARE MDB2_STATEMENT_mysql_81a2b39d1bc2abeacb0359a975958e93 FROM 'INSERT INTO subscriber (last_name, first_name, username,domain,password,email_address,ha1,ha1b,datetime_created) VALUES (\'\',\'\',\'1002\',\'10.32.0.97\',\'1002\',\'cvo at nvidia.com\',\'\',\'\', NOW())'] [Native code: 1054] [Native message: Unknown column 'last_name' in 'field list']


mysql> describe subscriber;
+---------------+------------------+------+-----+---------+----------------+
| Field         | Type             | Null | Key | Default | Extra          |
+---------------+------------------+------+-----+---------+----------------+
| id            | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| username      | char(64)         | NO   | MUL |         |                |
| domain        | char(64)         | NO   |     |         |                |
| password      | char(25)         | NO   |     |         |                |
| email_address | char(64)         | NO   |     |         |                |
| ha1           | char(64)         | NO   |     |         |                |
| ha1b          | char(64)         | NO   |     |         |                |
| rpid          | char(64)         | YES  |     | NULL    |                |
+---------------+------------------+------+-----+---------+----------------+
8 rows in set (0.00 sec)



Not sure where last_name & first_name come in here...??




From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of TCB
Sent: Sunday, March 21, 2010 9:03 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Problem with OpenSIPS Control Panel 4.0

Tried running ocp and i'm getting this error on adding users.

Failed to issue query, error message : MDB2 Error: no such field
I'm not getting any useful error to start tracing.

TC.
On Sat, Mar 20, 2010 at 12:10 AM, Christian Vo <cvo at nvidia.com<mailto:cvo at nvidia.com>> wrote:
Thanks Anca,

I think that's fixed the problem with smonitor,
I still can't add users though,

Fatal error:  Call to undefined method MDB2_Error::execute() in /srv/www/htdocs/opensips-cp/web/tools/users/user_management/user_management.php on line 223,...

-----Original Message-----
From: Anca Vamanu [mailto:anca at opensips.org<mailto:anca at opensips.org>]
Sent: Friday, March 19, 2010 2:41 PM
To: OpenSIPS users mailling list
Cc: Christian Vo
Subject: Re: [OpenSIPS-Users] Problem with OpenSIPS Control Panel 4.0

Forward from Alex:
---

Hi Christian,

Please check the following :
In the OpenSIPS config :
- if you have loaded the mi_fifo module;
loadmodule "mi_fifo.so"
- if you have declared the correct fifo parameters (if the fifo file
name is the same as in Control Panel boxes config and if it has right
permissions set);
- if I'm not wrong it should be something like this :
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
modparam("mi_fifo", "fifo_mode", 0666)

Leave the db.inc.php commented as it was before and please check the
stuff above and let me know.

Regards,
Alex

---

Christian Vo wrote:
>
> Forgot to add:
>
> I had smonitor's db.inc.php settings uncommented,
>
> Now getting this error instead
>
> [Fri Mar 19 09:59:50 2010] [error] [client 172.18.53.97] PHP Fatal
> error: Call to undefined method MDB2_Error::setFetchMode() in
> /srv/www/htdocs/opensips-cp/web/tools/system/smonitor/lib/db_connect.php
> on line 39, referer: http://10.32.0.97/cp/menu.php
>
> I'm very sure I installed pear and the related parts as per the
> install guide..
>
> *From:* Christian Vo
> *Sent:* Friday, March 19, 2010 9:57 AM
> *To:* OpenSIPS users mailling list
> *Subject:* RE: [OpenSIPS-Users] Problem with OpenSIPS Control Panel 4.0
>
> Thx Alex,
>
> Confirming that these are my settings:
>
> // each server is a box
>
> $box_id=0;
>
> // mi host:port pair || fifo_file
>
> // $boxes[$box_id]['mi']['conn']="127.0.0.1:8080<http://127.0.0.1:8080>";
>
> $boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
>
> // monit host:port
>
> $boxes[$box_id]['monit']['conn']="127.0.0.1:2812<http://127.0.0.1:2812>";
>
> $boxes[$box_id]['monit']['user']="admin";
>
> $boxes[$box_id]['monit']['pass']="monit";
>
> $boxes[$box_id]['monit']['has_ssl']=0;
>
> // description (appears in mi , monit )
>
> $boxes[$box_id]['desc']="SIP server";
>
> At this point, Monit seems to be working, but Statistics Monitor
> complains
>
> "Cannot connect to OpenSIPS Server via Management Interface
> (127.0.0.1/8080<http://127.0.0.1/8080>)
>
> "
>
> *From:* users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org>
> [mailto:users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org>] *On Behalf Of *Alex Ionescu
> *Sent:* Friday, March 19, 2010 1:42 AM
> *To:* OpenSIPS users mailling list
> *Subject:* Re: [OpenSIPS-Users] Problem with OpenSIPS Control Panel 4.0
>
> Hi Christian,
>
> Your boxes config must look like this :
>
> $box_id=0;
> // mi host:port pair || fifo_file
> //$boxes[$box_id]['mi']['conn']="127.0.0.1:8080<http://127.0.0.1:8080>";
> //i guess you are using fifo, not xmlrpc so :
> $boxes[$box_id]['mi']['conn']="/tmp/opensips_proxy_fifo";
>
> // monit host:port => this is for monit to work ok
> $boxes[$box_id]['monit']['conn']="127.0.0.1:2812<http://127.0.0.1:2812>";
> //you must take the username and password from the monit config file
> (monitrc).
> $boxes[$box_id]['monit']['user']="username";
> $boxes[$box_id]['monit']['pass']="password";
> // if you want to enable ssl
> $boxes[$box_id]['monit']['has_ssl']=1;
>
> Please re-check your config and let me know if it works now.
>
> Regards,
> Alex
>
> On 3/19/2010 01:42, Christian Vo wrote:
>
> New problem:
>
> So under opensips-cp/config/boxes.global.inc.php
>
> I changed the following:
>
> $boxes[$box_id]['mi']['conn']="127.0.0.1:8080<http://127.0.0.1:8080>";
>
> (previously was $boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";"
>
> This seemed to resolve my issue with Systemà Monit
>
> However,
>
> System à Statistics Monitor , Systemà SIP Trace , System à MI
> Commands, and System à Dispatcher all complain with the following
> on-screen message
>
> "Cannot connect to OpenSIPS Server via Management Interface
> (127.0.0.1/8080<http://127.0.0.1/8080>)"
>
> So I changed it back to
>
> $boxes[$box_id]['mi']['conn']="/tmp/opensips_fifo";
>
> But then
>
> I notice tools/monit/local.inc.php still doesn't contain any code..??
>
> *From:* users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org>
> <mailto:users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org>>
> [mailto:users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org>] *On Behalf Of *Christian Vo
> *Sent:* Thursday, March 18, 2010 10:21 AM
> *To:* OpenSIPS users mailling list
> *Subject:* Re: [OpenSIPS-Users] Problem with OpenSIPS Control Panel 4.0
>
> Thx for the notice, I've just downloaded and re-installed the lastest
> 4.0 tarball.. (moved the old dir to backup, and replaced it with the
> new, re-adjusting config parameters along the way.)
>
> Not sure if I missed something, but I'm getting this error on-screen now:
>
> Under the Systemà Monit tab
>
> I see "Primary Sip Server" 192.168.0.1:2812<http://192.168.0.1:2812>
>
> Followed by "I can't Connect"
>
> Something is wrong here, since I adjusted config/boxes.global.inc.php
> so that my only entry (Primary SIP Server) would be using
> 127.0.0.1:2812<http://127.0.0.1:2812> for monit
>
> And I don't know where else I'd find any entry for 192.168.0.1 related
> to this..
>
> This part was working for me back when I had the previous 4.0 tarball. odd
>
> *From:* users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org>
> <mailto:users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org>>
> [mailto:users-bounces at lists.opensips.org<mailto:users-bounces at lists.opensips.org>] *On Behalf Of *Alex Ionescu
> *Sent:* Thursday, March 18, 2010 4:46 AM
> *To:* OpenSIPS users mailling list
> *Subject:* Re: [OpenSIPS-Users] Problem with OpenSIPS Control Panel 4.0
>
> Hi,
>
> Actually there were a few issues that were found and solved the last
> few days. I hope you won't have anymore problems if you download the
> new 4.0 tarball.
>
> So, give it a try and let me know.
>
> Regards,
> Alex
>
> On 3/18/2010 13:35, ha do wrote:
>
> HI Alex
>
> did you find new issue on opensips cp
>
> Thank you
>
> Ha`
>
> --- On *Sat, 3/13/10, Alex Ionescu /<alex at opensips.org<mailto:alex at opensips.org>>
> <mailto:alex at opensips.org<mailto:alex at opensips.org>>/* wrote:
>
>
> From: Alex Ionescu <alex at opensips.org<mailto:alex at opensips.org>> <mailto:alex at opensips.org<mailto:alex at opensips.org>>
> Subject: Re: [OpenSIPS-Users] Problem with OpenSIPS Control Panel 4.0
> To: "OpenSIPS users mailling list" <users at lists.opensips.org<mailto:users at lists.opensips.org>>
> <mailto:users at lists.opensips.org<mailto:users at lists.opensips.org>>
> Date: Saturday, March 13, 2010, 9:21 AM
>
> Hi,
>
> I will investigate the problem and will let you know if I find any issue.
>
> Regards,
> Alex
>
> On 3/13/2010 06:39, Do Nguyen Ha wrote:
>
>
> Hi Alex
>
> here is mysql query:
> mysql> select * from ocp_admin_privileges\G;
> *************************** 1. row ***************************
> id: 58
> first_name:
> last_name:
> username: admin
> password: admin
> ha1: d2abaa37a7c3db1137d385e1d8c15fd2
> available_tools: all
> permissions: all
>
> so i am still getting the invalid username on opensips-cp version 4
> the i remove the folder opensips-cp version 4 and replace with
> opensips-cp version 3 and now it works without problem with
> opensips-cp version 3
>
> i dont change anything and step i do :
> step 1. cd /var/www
> step 2. delete folder opensips-cp
> step 3. download the opensips-cp_3.0.tar.gz
> step 4. untar the file opensips-cp_3.0
> step 5. chown www-data:www-data opensips-cp -R
>
> Thank you for your help
> Ha
>
> --- On *Fri, 3/12/10, Alex Ionescu /<alex at opensips.org<mailto:alex at opensips.org>>
> </mc/compose?to=alex at opensips.org<mailto:alex at opensips.org>>/* wrote:
>
>
> From: Alex Ionescu <alex at opensips.org<mailto:alex at opensips.org>> </mc/compose?to=alex at opensips.org<mailto:alex at opensips.org>>
> Subject: Re: [OpenSIPS-Users] Problem with OpenSIPS Control Panel 4.0
> To: "OpenSIPS users mailling list" <users at lists.opensips.org<mailto:users at lists.opensips.org>>
> </mc/compose?to=users at lists.opensips.org<mailto:users at lists.opensips.org>>
> Date: Friday, March 12, 2010, 9:02 AM
>
> Sorry,
>
> My mistake ... the MD5 should be applied on the value not on the field
> name ... So, it is :
>
> INSERT INTO ocp_admin_privileges
> (username,password,ha1,available_tools,permissions) values
> ('admin','admin',md5('admin:admin'),'all','all');
>
> On 3/12/2010 13:06, Alex Ionescu wrote:
>
> Hi,
>
> The problem seems to be your "step 11" :
>
> step 11. INSERT INTO ocp_admin_privileges
> (username,password,ha1,available_tools,permissions) values
> ('admin','admin','admin:admin','all','all');
>
> You must encode the *ha1* field. So, I believe that the correct query
> would be :
>
> INSERT INTO ocp_admin_privileges
> (username,password,md5(ha1),available_tools,permissions) values
> ('admin','admin','admin:admin','all','all');
>
> Anyway, you can always check the INSTALL file (I think the query is
> located on line 102 or 103).
>
> Regards,
>
> Alex
>
> On 3/12/2010 12:41, Do Nguyen Ha wrote:
>
> step 11. INSERT INTO ocp_admin_privileges
> (username,password,ha1,available_tools,permissions) values
> ('admin','admin','admin:admin','all','all');
>
> --
> Alex Ionescu
> www.voice-system.ro<http://www.voice-system.ro> <http://www.voice-system.ro>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org<mailto:Users at lists.opensips.org> <mailto:Users at lists.opensips.org<mailto:Users at lists.opensips.org>>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> --
> Alex Ionescu
> www.voice-system.ro<http://www.voice-system.ro> <http://www.voice-system.ro>
>
>
> -----Inline Attachment Follows-----
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org<mailto:Users at lists.opensips.org> <mailto:Users at lists.opensips.org<mailto:Users at lists.opensips.org>>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org<mailto:Users at lists.opensips.org> </mc/compose?to=Users at lists.opensips.org<mailto:Users at lists.opensips.org>>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> --
> Alex Ionescu
> www.voice-system.ro<http://www.voice-system.ro> <http://www.voice-system.ro>
>
>
> -----Inline Attachment Follows-----
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org<mailto:Users at lists.opensips.org> </mc/compose?to=Users at lists.opensips.org<mailto:Users at lists.opensips.org>>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org<mailto:Users at lists.opensips.org> <mailto:Users at lists.opensips.org<mailto:Users at lists.opensips.org>>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> --
> Alex Ionescu
> www.voice-system.ro<http://www.voice-system.ro> <http://www.voice-system.ro>
> ------------------------------------------------------------------------
>
> This email message is for the sole use of the intended recipient(s)
> and may contain confidential information. Any unauthorized review,
> use, disclosure or distribution is prohibited. If you are not the
> intended recipient, please contact the sender by reply email and
> destroy all copies of the original message.
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org<mailto:Users at lists.opensips.org> <mailto:Users at lists.opensips.org<mailto:Users at lists.opensips.org>>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> --
> Alex Ionescu
> www.voice-system.ro<http://www.voice-system.ro> <http://www.voice-system.ro>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org<mailto:Users at lists.opensips.org>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
TC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100323/445ec8d7/attachment-0001.htm 


More information about the Users mailing list