Although the libraries to work with Microsoft SQL Server used to be included with PHP, this is no longer the case. If you are using an IIS server, Microsoft has been gracious enough to provide drivers that use the native SQL client called SqlSrv; however, Linux users do not have access to this driver. To work with SQL Server 2008 on linux, you will need to install the FreeTDS libraries.
Installation and Configuration of FreeTDS
Note: You will need sudo access to do this procedure
- Install the Sysbase library for PHP (FreeTDS is provided with this)
sudo apt-get install php5-sybase
- Configure the freetds.conf file to use version 8.0 (this is necessary to work with MSSQL 2008, if you do not do this you will encounter odd behavior)
sudo vim /etc/freetds/freetds.conf
- Change this line under the [global] section
; tds version = 4.2
to
tds version = 8.0
- Restart Apahce
sudo /etc/init.d/apache2 restart
I wanted to compose you a bit of observation to finally say thank you yet again regarding the nice techniques you have documented at this time. It is quite wonderfully generous of people like you in giving extensively just what a lot of people would’ve offered for sale as an e-book in making some cash on their own, chiefly seeing that you could have done it if you ever decided. These strategies additionally served as the huge way to be sure that someone else have the identical fervor just like my own to discover out good deal more with regards to this problem. I know there are plentiful more agreeable instances ahead for people that take a look at your web site.