无法连接到Sql Server 2012 [英] Not getting connected to Sql Server 2012

查看:220
本文介绍了无法连接到Sql Server 2012的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Laravel 4中连接到Sql Server 2012时出现以下错误

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

PDOException SQLSTATE [IMSSP]:此扩展要求Microsoft 与SQL通信的SQL Server 2012本机客户端ODBC驱动程序 服务器.访问以下URL以下载Microsoft SQL Server 适用于x86的2012 Native Client ODBC驱动程序: http://go.microsoft.com/fwlink/?LinkId=163712

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

按照此链接 http://msdn.microsoft.com/en-us/library/cc296170.aspx

我在xampp/php/etc/ folder

php_sqlsrv_54_ts.dll

php_sqlsrv_54_ts.dll

php_pdo_sqlsrv_54_ts.dll

php_pdo_sqlsrv_54_ts.dll

并将这两个添加到php.ini文件中.但是我仍然看到相同的错误.

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

我正在使用Windows 7和xampp.请帮忙.

I am using windows 7 and xampp. Please help.

推荐答案

我删除了Xampp,并在Windows 7上安装了Wamp(32位)服务器,因为在完成几乎所有教程之后,我的xampp安装变得不稳定.

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

以下是导致成功连接到SQL SERVER 2012的步骤.

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

单击exe将其解压缩到两个dll下面的副本 在D:\ wamp \ bin \ apache \ Apache2.4.4 \ bin \ php.ini中添加扩展名

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

  • 之后,我下载并安装了此Microsoft Sql Server 2012 SP1功能包 http://www.microsoft.com/en-in/download/details.aspx?id = 35580

  • 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

    重新启动计算机后.您应该在phpinof()输出中看到这两个块

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

    就这样.希望这会对某人有所帮助.

    thats it. Hope this will help someone.

    这篇关于无法连接到Sql Server 2012的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆