沃梦达 / 编程问答 / php问题 / 正文

PDO MSSQL Server - 未找到驱动程序

PDO MSSQL Server - Driver not found(PDO MSSQL Server - 未找到驱动程序)

本文介绍了PDO MSSQL Server - 未找到驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试在 MSSQL 2012 Express 上连接到我的 localdb.

I am currently trying to connect to my localdb on MSSQL 2012 Express.

我已经从 http://www.microsoft.com/en-us/download/details.aspx?id=20098

我在我的 phpinfo() 中得到了某种 SQLSRV 部分.但是当我尝试创建一个新的 PDO 对象时,它说它没有驱动程序.我可以理解,因为 phpinfo() PDO 部分没有提到它,但它有自己的部分 + get_loaded_extensions 也显示 sqlsrv.我想那是来自官方的 MS Driver 吗?我正在使用 php_sqlsrv_53_nts.dll使用我的 Zend Server CE 5.6 和 PHP 5.3.9

I get some kind of SQLSRV section in my phpinfo(). But when I try to create a new PDO object it says it does not have the driver. Which I could understand since it is not mentioned on the phpinfo() PDO section, but it has its own section + the get_loaded_extensions also shows sqlsrv. I suppose thats from the official MS Driver ? I am using the php_sqlsrv_53_nts.dll With my Zend Server CE 5.6 with PHP 5.3.9

据我所知,我下载了错误的驱动程序,应该尝试PECL管理器带来的驱动程序吗?只有源代码可用,显然我在 Windows 机器上,所以我可以忘记我需要自己编译的所有内容 - 在使用 powershell 和我的 pecl/pear 安装时,我实际上遇到了后缀错误.

Now as far as I understood I downloaded the wrong driver and should try the one that is brought by the PECL manager? There is only the sourcecode available and obviously I am on a windows machine so I can forget about everything that I need to compile myself - I am actually getting the suffix errors when using the powershell and my pecl / pear installation.

有人解决了这个问题吗?非常感谢任何帮助

Has anybody solve that problem ? Any help much appreciated

一切顺利,理查德

推荐答案

好的.我想这只是这些日子之一.

Alright. I suppose its just one of these days.

我从 MS 提供的扩展中加载了错误的扩展.我需要使用 php_pdo_sqlsrv_53_nts而不是php_sqlsrv_53_nts

I got the wrong extension loaded from the supplied ones by MS. I needed to use php_pdo_sqlsrv_53_nts rather than php_sqlsrv_53_nts

感谢大家的帮助

这篇关于PDO MSSQL Server - 未找到驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:PDO MSSQL Server - 未找到驱动程序

基础教程推荐