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 FileNotFoundError 解决方案
  • ¥15 uniapp实现如下图的图表功能
  • ¥15 u-subsection如何修改相邻两个节点样式
  • ¥30 vs2010开发 WFP(windows filtering platform)
  • ¥15 服务端控制goose报文控制块的发布问题
  • ¥15 学习指导与未来导向啊
  • ¥15 求多普勒频移瞬时表达式
  • ¥15 如果要做一个老年人平板有哪些需求
  • ¥15 k8s生产配置推荐配置及部署方案
  • ¥15 matlab提取运动物体的坐标