【问题标题】:PHP 5.4 connection to MS SQL server 2008 r2PHP 5.4 连接到 MS SQL server 2008 r2
【发布时间】:2014-02-20 20:38:36
【问题描述】:

我想连接到本地主机上现有的 MS-SQL 数据库,我已经安装了 MS-SQL 驱动程序 3.0 并编辑了 php.ini 以启用扩展,即

 extension=php_sqlsrv_54_ts.dll

我已安装本机客户端 10.0 并收到此错误:

array (size=2)
  0 => 
    array (size=6)
      0 => string 'IMSSP' (length=5)
      'SQLSTATE' => string 'IMSSP' (length=5)
      1 => int -49
      'code' => int -49
      2 => string 'This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712' (length=216)
      'message' => string 'This extension requires the Microsoft SQL Server 2012 Native Client. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712' (length=216)

如果我尝试安装 Microsoft SQL Server 2012 Native Client,错误是操作系统不支持。

服务器正在运行 MS Server 2008 R2、MS-SQL 2008 R2 和 Apache 2.4.4

【问题讨论】:

  • 你得到了正确的版本吗?无法在 32 位操作系统上安装 64 位本机客户端,反之亦然
  • 服务器是 64 位的,本地客户端安装程序安装 64 位和 32 位左右,我似乎在这里理解

标签: php sql-server sql-server-2008-r2


【解决方案1】:

从错误消息看来,您需要下载并安装“Microsoft SQL Server 2012 Native Client ODBC driver for x86”,它应该可以从这里获得:

http://www.sqlservercentral.com/Forums/Topic1458276-2799-1.aspx

确保为您的操作系统获得正确版本的 Native Client

该页面包含有关让 MSQL 为您工作的所有链接。

【讨论】:

  • OK 尝试了页面上的所有内容,但仍然无法正常工作,知道为什么原生客户端 2012 无法安装?我现在正在服务器上运行更新,这应该可以解决 Windows 安装程序兼容性问题
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多