Microsoft SQL Server Drivers for PHP 5.3

To connect to Microsoft Sql database on Windows Server with PHP 5.3 or later, you need to using SQLSRV driver.

This driver requires Microsoft SQL Server 2012 Native Client that available in the SQL Server 2012 Feature Pack. (choose sqlncli.msi)

Download and enable SQLSRV driver
1. Download at http://www.microsoft.com/en-us/download/details.aspx?id=20098
2. Extract files to PHP Extension directory.
3. Enable extension on PHP.ini
This is the example of SQLSRV (Thread Safe) driver for PHP 5.3

extension=php_sqlsrv_53_ts.dll

To connect to database via PDO, enable PDO_SQLSRV instead.
This is the example of PDO_SQLSRV (Thread Safe) driver for PHP 5.3

extension=php_pdo_sqlsrv_53_ts.dll

4. restart web server.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s