We help IT Professionals succeed at work.
Get Started

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

3,217 Views
Last Modified: 2013-12-13
Hello,

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 :

'odbc:DRIVER={SQL Server}; SERVER=' . SQLSRV_IP . ',' . SQLSRV_PORT . ';DATABASE=' . SQLSRV_DBNAME

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)

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=80e44913-24b4-4113-8807-caae6cf2ca05

I've installed the 4 .dll in /php/ext/ and added the following line in PHP.ini
extension=php_pdo_sqlsrv_53_ts_vc6.dll
extension=php_sqlsrv_53_ts_vc6.dll
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.

Comment
Watch Question
Fixer of Problems
CERTIFIED EXPERT
Most Valuable Expert 2014
Commented:
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE