Install SQLSRV extension for PHP on WAMP

php, sql-server, wamp

Solution

If you are editing `c:\wamp\bin\php\php.ini`, do not edit that file just edit the one given by wamp server php.ini file, goto wamp server php, then php.ini then you get write ini file.

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

Also, make sure you right click WAMP shortcut and "Run as Administrator"

Problem

I've seen many of these posts and have looked through them all, but I still cannot get the SQLSRV extension running. Can you help me out? I will post all the information I have below: - Windows 7 64-bit - WampServer 2.2 32-bit - PHP 5.4.3 32-bit - Apache 2.2.22 (can't tell if VC6 or VC9) - Microsoft SQL Server 2012 Native Client 64-bit I downloaded SQLSRV30.exe. I extracted the dll files to 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 non-thread-safe. If I view phpinfo() I should see a 'sqlsrv' section, but I currently do not. What am I doing wrong?

Original source