問題描述
我目前正在嘗試在 MSSQL 2012 Express 上連接到我的 localdb.
I am currently trying to connect to my localdb on MSSQL 2012 Express.
我已經(jīng)從 http://www.microsoft.com/en-us/download/details.aspx?id=20098
我在我的 phpinfo() 中得到了某種 SQLSRV 部分.但是當我嘗試創(chuàng)建一個新的 PDO 對象時,它說它沒有驅(qū)動程序.我可以理解,因為 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
據(jù)我所知,我下載了錯誤的驅(qū)動程序,應該嘗試PECL管理器帶來的驅(qū)動程序嗎?只有源代碼可用,顯然我在 Windows 機器上,所以我可以忘記我需要自己編譯的所有內(nèi)容 - 在使用 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 - 未找到驅(qū)動程序的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!