I found a lot of answers on the Internet, but they are not the root cause of the problem.
Finally, it can be seen on the official website that the connection of PDO_dblib to MSSQL database is through FreeTDS.
PDO_DBLIB is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to Microsoft SQL Server and Sybase databases through the FreeTDS libary.
Therefore, the problem was found. Freetds is a re-implementation of TDS protocol (Baidu’s). Different database versions use different VERSIONS of TDS protocol, so it is ok to modify the corresponding TDS version.
I am an Ubuntu system and the installation directory of Freetds is /usr/local/freetds
Modify the file to/usr/local/freetds/etc/freetds. Conf file.
Connect SQL Server2000, I change to TDS version=4.2 is ok, although Baidu is 8.0, I do not know this, but I know the key of the problem is ok, and so on in the future to understand the update.
Finally, it can be seen on the official website that the connection of PDO_dblib to MSSQL database is through FreeTDS.
PDO_DBLIB is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to Microsoft SQL Server and Sybase databases through the FreeTDS libary.
Therefore, the problem was found. Freetds is a re-implementation of TDS protocol (Baidu’s). Different database versions use different VERSIONS of TDS protocol, so it is ok to modify the corresponding TDS version.
I am an Ubuntu system and the installation directory of Freetds is /usr/local/freetds
Modify the file to/usr/local/freetds/etc/freetds. Conf file.
Connect SQL Server2000, I change to TDS version=4.2 is ok, although Baidu is 8.0, I do not know this, but I know the key of the problem is ok, and so on in the future to understand the update.
Read More:
- A PHP Error was encountered Severity: Warning Message: mysqli::real_connect(): Headers and client
- Mongodb uses Mongo to report error: could’t connect to server 127.0.0.1:27017, connection attempt failed: socket
- JDBC connect to Sql Server to connect to the database–The TCP/IP connection to the host localhost, port 1433 has failed
- PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[08004] [1040] Too many connections
- PHP connection to MySQL database error: call to undefined function MySQL_ connect()
- Solution to Vue cli · failed to download repo vuejs templates/webpack: connect etimeout followed by an IP digital error message
- [Linux] curl: (7) failed to connect to 127.0.0.1 port 1086: connection reused solution
- Local can link to the server database, upload jar package to the server will report an error
- PHP connection PostgreSQL error call to undefined function PG_ connect()
- CentOS Liunx 7 uses rdesktop to remotely connect to the Alibaba Cloud server and it appears Failed to connect, CredSSP required by server.
- 【Synergy】Error:failed to connect to server:Connection was refused
- Connection error:Cannot connect to redis-server. Details are available in connection log.
- MySQL: if the remote connection using navicatip fails, prompt “is not allowed to connect to this MySQL server”
- [Solved] failed to connect to server, reason: Unable to establish connection
- Failed to connect to Mir:Failed to connect to server socket:No such file or directory
- Error: could’t connect to server 127.0.0.1:27017, connection attempt failed
- The solution of PL / SQL can’t connect to the remote server after installing Oracle locally
- Failed to connect to remote VM. Connection reused. Connection reused: Connect
- MongoNetworkError: failed to connect to server [localhost:27017] on first connect [Error: connect EC
- About WLW (Windows Live Writer): “unable to connect to your log service: invalid server response” solution