Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call to undefined function sqlsrv_connect() with WAMP

I know that this question has already been asked several times on this website but I'm seriously starting to wonder wheter I'm crazy or not.

My configuration : WampServer 2.5 64bits (PHP 5.5.12, Apache 2.4.9)

My steps:

  1. Download Microsoft Driver SQLSRV32.exe from https://www.microsoft.com/en-us/download/details.aspx?id=20098
  2. Extract the files from the .exe downloaded on my desktop
  3. Copy php_sqlsrv_55_ts.dll and php_pdo_sqlsrv_55_ts.dll into C:\wamp\bin\php\php5.5.12\ext
  4. Edit C:\wamp\bin\php\php5.5.12\php.ini adding "extension=php_pdo_sqlsrv_55_ts.dll" and "extension=php_sqlsrv_55_ts.dll"
  5. Edit C:\wamp\bin\apache\apache2.4.9\bin\php.ini adding "extension=php_pdo_sqlsrv_55_ts.dll" and "extension=php_sqlsrv_55_ts.dll"
  6. Restart all services (I even tried to restart my computer, but nothing works)

I still get the error... So what am I missing to make this work ?

like image 670
qwertzuiop Avatar asked Jan 05 '16 09:01

qwertzuiop


1 Answers

I finally found what was causing the problem. My Wamp was in 64 bits but the sqlsrv driver only works with 32 bits version. Now it works perfectly.

like image 192
qwertzuiop Avatar answered Sep 25 '22 14:09

qwertzuiop