本機php串連遠程sql server 2008問題請教

來源:互聯網
上載者:User
本機環境:WampServer Version 2.4
遠端資料庫:sql server 2008


回複討論(解決方案)

php 5.3 以下可以用mssql擴充
php5.3+ 用sqlsrv 擴充

php 5.3 以下可以用mssql擴充
php5.3+ 用sqlsrv 擴充

用sqlsrv擴充的話,遠端資料庫需要什麼配置嗎?

我目前只在我本wamp下裝了擴充,還裝了個Microsoft SQL Server 2008 R2 Native Client

但測試還是提示:Fatal error: Call to undefined function sqlsrv_connect() in D:\wamp\www\test\testsql2008.php on line 15

1、遠端資料庫需要開啟遠端連線的許可權。

2、本地php還得安裝sqlsrv擴充。開啟方法網上搜,需要注意你的php版本。

我裝的是Microsoft Drivers for PHP for SQL Server 3.0
按上面的要求,也一樣樣做了(如)

http://bbs.csdn.net/topics/390720089
用phpStudy擴充裡面已經給配好了,勾上就可以了。

你的擴充沒有開啟成功。。

問題解決了,說明一下自己配置的web伺服器環境:
1,系統版本:win7 旗艦版 64位
2,php-5.3.2-nts-Win32-VC9-x86 (IIS中使用PHPManager安裝了擴充:php_pdo_sqlsrv_53_nts_vc9.dll php_sqlsrv_53_nts_vc9.dll)
3,PHPManagerForIIS-1.2.0-x64
4,使用fascCGI模式
5,安裝Microsoft SQL Server 2008 R2 Native Client

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.