Not getting connected to Sql Server 2012

被刻印的时光 ゝ 提交于 2019-12-11 08:31:53

问题


I am getting following error while connecting to Sql Server 2012 in Laravel 4

PDOException SQLSTATE[IMSSP]: This extension requires the Microsoft SQL Server 2012 Native Client ODBC Driver to communicate with SQL Server. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712

As per this link http://msdn.microsoft.com/en-us/library/cc296170.aspx

I downloaded and installed these two files in xampp/php/etc/ folder

php_sqlsrv_54_ts.dll

php_pdo_sqlsrv_54_ts.dll

And added these two in the php.ini file. But still I am seeing the same error.

I am using windows 7 and xampp. Please help.


回答1:


I removed Xampp and installed Wamp (32 bit) server on my Windows 7, because after following almost every tutorial my xampp installation became unstable.

Following are the steps that resulted in successful connection to SQL SERVER 2012.

  • Download Microsoft SQL Driver for PHP http://www.microsoft.com/en-in/download/details.aspx?id=20098

  • Click on the exe to extract it copy below two dlls Add Extensions in the D:\wamp\bin\apache\Apache2.4.4\bin\php.ini

    extension=php_pdo_sqlsrv_54_ts.dll
    extension=php_sqlsrv_54_ts.dll
    
  • After that I downloaded and installed this Microsoft Sql Server 2012 SP1 Feature Pack http://www.microsoft.com/en-in/download/details.aspx?id=35580

    After this restart your computer.You should see these two blocks in your phpinof() output

thats it. Hope this will help someone.



来源:https://stackoverflow.com/questions/21823641/not-getting-connected-to-sql-server-2012

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!