asterisk2billing.org
http://forum.asterisk2billing.org/

Can not export CDRs in CSV using different mysql port number
http://forum.asterisk2billing.org/viewtopic.php?f=33&t=10622
Page 1 of 1

Author:  cmpjunior [ Mon Dec 02, 2013 9:34 am ]
Post subject:  Can not export CDRs in CSV using different mysql port number

Hi,

We have configured A2Billing to connect to a remote database server running on a different TCP port. However, every time we clicked the "Export CSV" link after generating the CDRs, the dump file contains the message "Error. Cannot connect to Database." I tried searching on this forum but I did not found anything related to our problem. Can someone from this forum direct me to an existing document or thread pertaining to the same setup we have? Any inputs or suggestions will greatly be appreciated in order to resolve this problem.

Thank you.

CMPJunior

Author:  bucasia [ Mon Dec 02, 2013 10:47 am ]
Post subject:  Re: Can not export CDRs in CSV using different mysql port number

I've never tried running MySQL on a different port but it looks like this file - a2billing/admin/lib/iam_csvdump.php is being used to establish the database connection for CSV exports.

My guess would be it's only picking up the hostname, not the port from the config file.

Maybe here -

272 if(!$conn= $this->_db_connect_mysql($dbname, $user , $password, $host))

you could try -

272 if(!$conn= $this->_db_connect_mysql($dbname, $user , $password, $host:PORT-NUMBER))

but ... back it up and don't blame me :-)

or maybe wait for someone that knows what the code does ...

Author:  cmpjunior [ Mon Dec 02, 2013 11:43 am ]
Post subject:  Re: Can not export CDRs in CSV using different mysql port number

Thanks for the input. Adding ":<port number>" seems to worked.

CMPJunior

Author:  bucasia [ Mon Dec 02, 2013 1:26 pm ]
Post subject:  Re: Can not export CDRs in CSV using different mysql port number

It's probably worth sending a bug report as obviously that's not the best way to fix it as you'll lose the change if you upgrade.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/