我决定使用FreeTDS驱动程序和unixODBC来管理基于LAMP的应用程序与远程MsSQL数据库之间的PDO连接.不幸的是,驱动程序似乎没有读取freetds.conf文件,也没有直接通过服务器的CLI设置或通过putenv()函数在php文件中指定的环境变量.
现在一些数据:
因为我使用命令
TDSVER=7.0 tsql -H >IP< -p 1433 -U username
Run Code Online (Sandbox Code Playgroud)
系统提示我输入密码并建立连接.
没有命令前面的TDSVER - 连接失败并显示以下消息:
Error 20017 (severity 9):
Unexpected EOF from the server
OS error 115, "Operation now in progress"
Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server
Run Code Online (Sandbox Code Playgroud)tsql -C命令回声这样的输出:
Compile-time settings (established with the "configure" script)
Version: freetds v0.91
freetds.conf directory: /usr/local/etc
MS db-lib source compatibility: yes
Sybase binary compatibility: no
Thread safety: yes …Run Code Online (Sandbox Code Playgroud)