I'm connecting to external MSSQL database for exports from PHP55/osx and I have wierd issue.
code:
new \PDO("dblib:host={$hostname};dbname={$dbname}", $user, $pass);
throws:
SQLSTATE[01002] Adaptive Server connection failed (severity 9)
but connection from CLI works correcty
tsql -S hostname -U user -P pass -L dbname:
locale is "cs_CZ.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
1>
freetds.conf:
[hostname]
host = ipaddress
port = 1433
tds version = 8.0
tsql -C:
Version: freetds v0.91
freetds.conf directory: /usr/local/Cellar/freetds/0.91/etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 7.1
iODBC: no
unixodbc: no
SSPI "trusted" logins: no
Kerberos: no
Any ideas? I have tried alomost anything, connect to hostname, ip, with and without port, to instance name, another user, TDS versions 7.0,7.1,7.2,8.0, reinstall php and freetds