dreamy6301 2015-10-28 15:59
浏览 38
已采纳

PHP SQL服务器扩展已损坏

I'm trying to get PHP talking to MS SQL server by following this guide, which is for SQL server 2005 (I'm using 2014 express but it was the most recent I could find).

I'm running 32bit Wamp and PHP 5.5.12. I have installed php_sqlsrv_55_ts.dll and php_sqlsrv_55_ts.dll in the ext folder and have added the following lines to php.ini:

extension=php_sqlsrv_55_ts.dll
extension=php_pdo_sqlsrv_55_ts.dll

All seems to go smoothly but no SQLSRV information is listed under phpinfo() and on the php extensions tab for Wamp they are listed but with a red triangle containing an exclamation mark next to them.

Anyone know what I've missed?

  • 写回答

1条回答 默认 最新

  • douduocuima61392 2015-10-29 09:22
    关注

    If you just type php at the command line it waits for more input, it does not hang.

    If when you run php from the command line ( PHP CLI ) you see sqlsrv is supported but not when you run phpinfo through Apache, then you have edited the wrong php.ini file. There are normally 2, one to control PHP CLI and one to control PHP when being run under Apache.

    The php.ini that controls php under apache is normally in the \apache\bin folder. The exact path is of course dependant upon whether you use WAMPServer/XAMPP... or install everything yourself.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)