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 - 未找到驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)