Install SQLSRV extension for PHP on WAMP

I saw many of these messages and looked through all of them, but I still cannot get the SQLSRV extension. Can you help me? I will send all the information I have below:

  • 64-bit version of Windows 7
  • WampServer 2.2 32-bit
  • PHP 5.4.3 32-bit
  • Apache 2.2.22 (I can not determine VC6 or VC9)
  • Microsoft SQL Server 2012 Enterprise Client 64-bit

I downloaded SQLSRV30.exe. I extracted the dll files in C: \ wamp \ bin \ php \ php5.4.3 \ ext.

In my php.ini:

  • extension_dir = "c: /wamp/bin/php/php5.4.3/ext/"
  • extension = php_sqlsrv_54_ts.dll
  • extension = php_pdo_sqlsrv_54_ts.dll

I know that SQLSRV30.exe is built as 32-bit. This is why I have 32-bit versions of Wamp and PHP. I also know that nothing in Wamp is thread safe.
If I look at phpinfo (), I should see the "sqlsrv" section, but I'm not currently doing this.

What am I doing wrong?

+6
source share
3 answers

If you are editing c:\wamp\bin\php\php.ini , do not edit this file, just edit the file specified by the php.ini file of the wamp server, goto wamp server php, then php.ini, after which you will get the ini recording file .

I had the same problem, this fixed it for me.

Also, make sure you right-click the WAMP shortcut and "Run as administrator"

+4
source

This morning I ran into some problems, but I found out that I have x64 WampServer ... Which was not going to work correctly.

So, I reinstalled x86 WampServer and kept track of everything I could find on PHP.net ( http://php.net/manual/en/sqlsrv.requirements.php ). Since I saw this post when I was looking for my x64 solution, I thought I would come back and try to help you:

1) If you have PHP 5.4. # on Wamp, I put it TS, VC9

2) Find the correct "php.ini": mine is NOT in the folder "bin / php #", but in the folder "bin / apache #" (C: \ wamp \ bin \ apache \ apache2.22.22 \ Bin \ php.ini )

3) There are 2 versions of SQLSRV drivers, 2.0 and 3.0, make sure you have 3.0!

In appearance, we have exactly the same version of Wamp, so ... I'm sure you need to use "php_sqlsrv_54_ts.dll" and "php_pdo_sqlsrv_54_ts.dll".

+2
source

Have you seen the new dll in the php extension list? If so, click on it and make sure there is a V by its name. (left-click on the green symbol of the green symbol. php β†’ php extensions β†’ the name of your DLL)

I had a similar problem with php 5.5, SQLSRV31.exe, php_sqlsrv_55_nts.dll and php_sqlsrv_55_ts.dll. It worked wonderfully.

+1
source

All Articles