CodeIgniter MSSQL connection

For x86 win download http://www.microsoft.com/en-us/download/details.aspx?id=20098 for using with:

$db['default']['dbdriver'] = 'sqlsrv';
use the php_sqlsrv_XX_ts_vcX.dll in php.ini extension

if your webserver and your database server are not on same server with your app, install this:

http://go.microsoft.com/fwlink/?LinkID=188400&clcid=0x409

and for linux as webserver:

$db[‘default’][‘dbdriver’] = ‘mssql’;

download & install = php5-sybase + freetds
<br/>edit /usr/local/etc/freetds.conf
<br/>create pdo_dblib.so & php_mssql.so (if not allready exist on your extension dir), and apply to php.ini

sudo /etc/init.d/apache2 restart

and just dont forget to allow connection to your DB (default port for mssql is 1433)

Leave a Comment