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:
I downloaded SQLSRV30.exe. I extracted the dll files to C:\wamp\bin\php\php5.4.3\ext.
In my php.ini:
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?
The SQLSRV extension is enabled by adding appropriate DLL file to your PHP extension directory and the corresponding entry to the php. ini file. The SQLSRV download comes with 8 driver files, four of which are for PDO support. The most recent version of the driver is available for download here: » SQLSRV download.
PDO_SQLSRV is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to MS SQL Server (starting with SQL Server 2005) and SQL Azure databases.
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"
I ran into some trouble this morning, but I found out I had a x64 WampServer... Which was not gonna work correctly.
So, I reinstalled a x86 WampServer, and followed everything i could find on PHP.net (http://php.net/manual/en/sqlsrv.requirements.php). Because I saw this post while 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 bet it's TS,VC9
2) Locate the correct 'php.ini' : mine is NOT in the 'bin/php#' folder, but in the 'bin/apache#' folder (C:\wamp\bin\apache\apache2.2.22\bin\php.ini)
3) There are 2 SQLSRV driver versions, 2.0 and 3.0 , make sure you have 3.0!
From the looks of it, we have exactly the same Wamp version, so... I'm pretty sure you have to use the 'php_sqlsrv_54_ts.dll' and 'php_pdo_sqlsrv_54_ts.dll'.
Did you see your new dll in your php extensions list? If so, click on it and make sure there is a V by its name. (left click on the hopefully green wamp symbol. php-->php extensions-->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. Miraculously it worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With