Today a project that needs to connect to SQL Server database, get data, follow the previous practice, install LNMP, load up after installing FreeTDS, and then add the MSSQL module in standalone PHP,./configure make && Make install and then add the extension MSSQL module in php.ini all the way to install smoothly, after installation, I in the local test tsql-h 192.168.1.33-u sa-p 12345 can log into SQL Server, can also query to the data
Then it is natural to restart PHP NGINX and then tell the development, environment OK, you can start testing, the results of less than 5 minutes development told me not to get the data, I let the development sent me a link, I log in to test a look, sure enough is not access to data, and also reported error, login system to view the log, Tip Waring Mssql_driver line 113 anyway debug through PHP to get data on the error, via MSSQL Drive local connection is normal. Toss for a day and a half. Later, the problem was finally found, the original version of the problem
My environment FreeTDS version is 0.95.0 PHP version is 5.5.24 the database to connect to is SQL2005
Specify the version when recompiling the FreeTDS./configure--prefix=/usr/local/freetds/--with-tdsver=7.1--enable-msdblib
I checked some information, said FreeTDS compile the installation when the default is not specified version of the default is 5.0 this is a match Sqserver 2000 database of the specified 8.0 version of SQL Server 2008 of the other I did not verify that the version of the database, for this little The problem pit me a day and a half, special record, later when stepping on similar pits can quickly pits
FreeTDS Connection Database Issues