Database Connection on version 2.0.1Busy 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.