Trouble installing the PHP PDO driver for MSSQL on Windows and Xampp

ITBenelux used Ask the Experts™

I'm having trouble connecting with MSSQL on Xampp/Windows
(dev local server connecting to a distant DB (MSSQL 2005)).

The following Connection string work fine :


so I don't think it have anything to do with DB rights or firewall but

'mssql:host=' . SQLSRV_IP . ';dbname=' . SQLSRV_DBNAME, SQLSRV_USER, SQLSRV_PWD

give me the following error message : 'could not find driver'.

I've search the web and stumble upon the following link by MS (which I hope is the latest version)

I've installed the 4 .dll in /php/ext/ and added the following line in PHP.ini
but it still don't work (loading any other .dll give me various errors on apache startup)

Could someone tell me what I'm doing wrong or give me step by step instruction ?
I'm fairly new working with anything else than MySQL or PostgreSQL.

Thank you and kind regards.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Fixer of Problems
Most Valuable Expert 2014
There is a file called "SQLSRV_Help.chm" in that download.  In it are programming and formatting examples for all the drivers including PDO.  Under "System Requirements" on that page is a very brief mention of "Microsoft SQL Server 2008 R2 Native Client" which is Required to make the PHP drivers work.  You can download it from one of the links on   You have to scroll thru the page to find it.

I have used the previous version (1.1) and it worked fine but it didn't have PDO.


Thank you.

The following CS do work now :

sqlsrv:Server=' . SQLSRV_IP . ';Database=' . SQLSRV_DBNAME
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Good, glad to help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial