To add/install MSSQL support in PHP5 on Debian linux server, follow the below steps:
- Install FreeTDS and the PHP MS SQL extension
sudo apt-get install freetds-common freetds-bin unixodbc php5-sybase
Note: That is correct, the MS SQL extension is in the “php5-sybase” package.
- Restart Apache
sudo /etc/init.d/apache2 restart
If everything went fine then you will be able to connect to your MSSQL Server using mssql_connect().