PDO MSSQL Server-找不到驱动程序 [英] PDO MSSQL Server - Driver not found
问题描述
我目前正在尝试连接到MSSQL 2012 Express上的localdb.
I am currently trying to connect to my localdb on MSSQL 2012 Express.
我已经从 http下载并安装了正式的Microsoft驱动程序: //www.microsoft.com/zh-cn/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-找不到驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!