Cannot load sqlsrv

641 views Asked by At

I don't know if this is the right place to ask this question, if not, please tell me where. I need to connect a php script running on wamp with an MSSQL server. I downloaded and installed the Microsoft Drivers for PHP and added the following lines in php.ini:

extension=php_sqlsrv_55_ts.dll
extension=php_pdo_sqlsrv_55_ts.dll

The weird part is that the extension is shown as loaded when I look for it in the wamp menu, and not found in phpinfo();

enter image description here

enter image description here

(thread safety is enabled, hence I use the ts version)

EDIT

I solved it, wrote the solution below. But, I still cannot get it to work on Windows Server 2008 R2 SP1. Same problem, extension is loaded in the menu, but not on the wamp homepage and phpinfo();

2

There are 2 answers

0
Skatch On BEST ANSWER

Success, finally.

  1. First, I downloaded an unofficial x64 version of sqlsrv (good job Microsoft on not labeling and leaving only 32bit versions -_-)
  2. Second, I downloaded and installed the SQL Native Client x64.

Hope this helps if anyone else has the same problem.

Đ•DIT

I still have the same problem on the same wamp installation on Windows Server 2008 R2 SP1

1
cliffscrabbler On

Do you have Visual C++ Redistributable for Visual Studio? I remember that solved one of my problems. Unfortunately I still have other ones, which I have just posted a question for. I will be trying the x64 version and see if things work. Looks like it is version 3.0, so I suppose ODBC 11 won't work with it and one would need to use native client