douxie7339 2013-09-18 10:08
浏览 123

CDbConnection无法打开数据库连接

I found lots of answers about this question and it is asked in stackoverflow as well, but that answers do not solve my problem.

The method they are telling in the forums and Q/A websites to connect PHP with MS SQL Server, I am using the same but I am getting the following error in YII Framework

CDbConnection failed to open the DB connection: SQLSTATE[IMSSP]: This extension requires the Microsoft SQL Server 2012 Native Client ODBC Driver to communicate with SQL Server. Access the following URL to download the Microsoft SQL Server 2012 Native Client ODBC driver for x86: http://go.microsoft.com/fwlink/?LinkId=163712

  • I have installed the Microsoft SQL Server 2012 Native Client ODBC driver from the given link above.
  • I have included the following lines in php.ini

extension=php_sqlsrv_54_ts.dll

extension=php_pdo_sqlsrv_54_ts.dll

  • I have save the above dlls in php/ext folder.

But still I am getting this error. Moreover I have also made a System DSN in ODBC Data Source Administrator in Administrative Tools in Windows.

But I didn't found the solution of my problem.

Please help me out to solve this problem.

Thanks!

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料
    • ¥15 使用R语言marginaleffects包进行边际效应图绘制
    • ¥20 usb设备兼容性问题
    • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
    • ¥15 安装svn网络有问题怎么办