Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Apr 18, 2024 6:12 am
Hosted Voice Broadcast


All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Database port issue v2.0.1
PostPosted: Thu Jan 10, 2013 2:53 pm 
Offline

Joined: Thu Aug 25, 2011 9:03 pm
Posts: 8
Database Connection on version 2.0.1

Busy upgrading and came across a bug if you use a different database port number, as defined in /etc/a2billing.conf.

Using MySQL all was connecting fine on port 3306, the default port. However, trying to connect to the live database server I was having issues (I connect over an SSH tunnel via a port on the local machine).

After a lot of hunting, the issues are in the connect strings used in Class.A2Billing.php and Class.Connection.php.

In Class.A2Billing.php, line 3595 should read:

Code:
$datasource = 'mysqli://' . $this->config['database']['user'] . ':' . $this->config['database']['password'] . '@' . $this->config['database']['hostname'] . ':' . $this->config['database']['port'] . '/' . $this->config['database']['dbname'];

(similar change for the line just above for postgres)

And in Class.Connection.php line 47 should be:

Code:
$datasource = 'mysql://' . USER . ':' . PASS . '@' . HOST . ':' . PORT . '/' . DBNAME;


Again, with similar changes for postgres folk.

Hope this helps and can be included.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 
Hosted Voice Broadcast


All times are UTC


Who is online

Users browsing this forum: No registered users and 15 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group