PHP uses dblib to connect to sqlserver. An error is reported
SQLSTATE[01002] Adaptive Server connection failed (severity 9)
solution 1:
In/usr/local/freetds/etc/freetds.conf (the specific location may be different), add:
[mssql]
host = your ip
Port = 1433
tds version = 8.0
solution 2:
Remove the version number setting under [global] in/usr/local/freetds/etc/freetds.conf and change it to 8.0
That is to say, it will; TDS version = 4.2 the semicolon in front of the line is removed and changed to:
tds version = 8.0
or
Adding version number in DSN
new PDO(” dblib:version=8.0; host=192.168.0.1:1433; dbname=test”,”test”,”pwd”);
—————————–
If not, try changing the version number to 4.2 or other possible version numbers
Similar Posts:
- (20002, b’DB-Lib error message 20002, severity 9:\nAdaptive Server connection failed (127.0.0…
- nginx: [error] open() “/usr/local/nginx/logs/nginx.pid“ failed (2: No such file or directory)
- [Solved] Php5.6.30 environment error call to undefined function imagecreate() compile and install GD Library
- How to Solve Git Warning: possible DNS spoofing detected
- An error occurred during local report processing: report definition has an invalid target namespace
- wampserver 3.0.4 Same LAN Error: You don’t have permission to access /index.php on this server
- [Solved] JDBC connection to SQL Service reported an error: “the driver cannot establish a secure connection with SQL server by using SSL encryption“
- One of the ways to display no author, no date in SVN log
- Mac remote service repair: warning: remote host identification has changed!
- PostgreSQL Connect Error: FATAL: no pg_hba.conf entry for host