且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在php.ini文件中添加扩展项后,sqlsrv驱动程序未出现在WAMP服务器phphinfo()上

更新时间:2023-02-23 16:00:20

64位WAMP服务器无法使用驱动程序extension = php_sqlsrv_55_ts.dll进行连接;扩展名= php_pdo_sqlsrv_55_ts.dll;

因此,我安装了32位版本的WAMP服务器,现在它可以正常工作.

I wanted to setup a database connection from PHP to SQL server 2012.I have a wamp server(64 bit) set up on a windows machine(64 bit) with PHP 5.5.12 and on the same machine I have SQL server 2012 installed.

Extracted sqlsrv drivers from official_link

Copied the extracted drivers php_sqlsrv_55_ts.dll, extension = php_pdo_sqlsrv_55_ts.dll to php\ext folder, and then changed the php.ini file to include the extensions

extension = php_sqlsrv_55_ts.dll; extension = php_pdo_sqlsrv_55_ts.dll;

Now I tried

<?php
  phpinfo();
 ?>

I see the following information without any SQL server information in it.

Don't seem to have configured SQL server connection successfully. Could some one please guide me on what I am missing here.

64 bit WAMP server was not able to connect using the drivers extension = php_sqlsrv_55_ts.dll; extension = php_pdo_sqlsrv_55_ts.dll;

So, I installed a 32 bit version of the WAMP server and it works fine now.