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

"Connection failed", but MySQL connection from the CLI works
http://forum.asterisk2billing.org/viewtopic.php?f=33&t=12661
Page 1 of 1

Author:  gromm [ Tue Dec 20, 2016 9:54 pm ]
Post subject:  "Connection failed", but MySQL connection from the CLI works

Hi everyone.

I have A2Billing set up on a new server, upgrading from v2.0.14 to v2.2.0 but I'm getting the dreaded "Connection failed" white screen of death.

I took the database configuration settings out of /etc/a2billing.conf and was able to successfully connect to our database using the CLI mysql client to connect to our remote server. The old server that we're replacing (and still using) is also able to connect to this same remote server without any issue.

I'm pretty sure that I've got all the file permissions right (going by this thread: viewtopic.php?t=1929), but I may have gotten something wrong somewhere. I'm definitely not getting any PHP errors in my Apache error log, so that hasn't been much help either.

Any help will be appreciated, and I will happily cooperate with any suggestion.

Author:  gromm [ Fri Dec 23, 2016 3:50 pm ]
Post subject:  Re: "Connection failed", but MySQL connection from the CLI works

I finally found the issue.

You can't use a hashmark in the password for the new version of A2Billing. This was possible in the old version, and it was working literally everywhere else on our server - in my PHP test script, in shell scripts that accessed the same database, in Asterisk and even in other web apps.

But nope. Not A2Billing v2.2.0!

Author:  warwickw [ Fri Mar 16, 2018 2:58 pm ]
Post subject:  Re: "Connection failed", but MySQL connection from the CLI works

I'm getting the same thing. My test php script connects fine, as well as from the cmd line. Any ideas on where else to look?

I've removed all special characters from the password.

Running CENTOS 7 / PHP 5.6 / APACHE

cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)

php -m
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mcrypt
mhash
mysql
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
readline
Reflection
session
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]


mysql -u a2billinguser -p -h XXXXXXXXXXXX mya2billing

MariaDB [mya2billing]> show tables;
+---------------------------+
| Tables_in_mya2billing |
+---------------------------+
| cc_agent |
| cc_agent_commission |
| cc_agent_signup |
| cc_agent_tariffgroup |
...
97 rows in set (0.00 sec)

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