有一个文件php.ini,该文件必须放在winnt目录下里面有一些行类似于下面:
;extension=php_bz2.dll
;extension=php_ctype.dll
;extension=php_cpdf.dll
;extension=php_curl.dll
.....
;extension=php_mssql.dll
你把上面的那一行的注释去掉,然后重启iis

解决方案 »

  1.   

    而且我后来找到了原因,是因为php_mssql.dll版本不对
    而我删除了旧的版本后(大概没删干净)
    装了新的版本后 ,就显示:
    Security Alert! The PHP CGI cannot be accessed directly. 
    This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.For more information as to why this behaviour exists, see the manual page for CGI security.For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.
      

  2.   

    看看这篇文章吧!写的很详细!
    http://www.csdn.net/Expert/TopicView1.asp?id=1008822
      

  3.   

    是不是没有把dll拷到指定的目录呢?
      

  4.   

    还应该有一个extenteion_dir
    把他的值改成你的php_mssql.dll所在的路径
    还有你的机器装了sqlserver或者他的客户端软件了吗
    如果没有要把php下面的dlls下面的ntwdblib.dll铐到系统目录下
    你先查找一下有没有这的dll