*****iis6+php以CGI方式运行!发现错误~Why???*****
环境:
win2003+iis6+php4.3.8
配置:
在主目录中添加应用程序扩展为c:\php\php.exe 扩展名为.php 全部动作和脚本引擎以选中
C盘为NTFS, c:\php\目录everyone为所有全限
错误信息: http://localhost/phpinfo.php
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.
谢谢!
问题点数:88、回复次数:6Top
1 楼SpbDev(急先锋)回复于 2004-11-02 16:33:36 得分 60
在php.ini中查找cgi.force_redirect,能找到类似如下的一行:
; cgi.force_redirect = 1
去掉行首的分号,并将数字1改为0即可:
cgi.force_redirect = 0Top
2 楼benben1982(~∩_∩~)回复于 2004-11-02 16:57:47 得分 0
能说说原因吗??Top
3 楼jxflll(峰)回复于 2004-11-02 17:02:29 得分 28
帮你顶一下先!Top
4 楼SpbDev(急先锋)回复于 2004-11-02 17:29:18 得分 0
windows下以CGI方式运行php,必须将该配置设置为0来禁用该功能(默认值为1,分号是注释,所以有分号的话后面怎么修改都不管用的)
这是php安装文件中的说明,不用问为什么,照着做就行。非要问为什么就得到php.net站点上问php的开发人员了。Top
5 楼benben1982(~∩_∩~)回复于 2004-11-03 08:44:17 得分 0
感谢~!结贴Top
6 楼alexzhang00(三角猫)回复于 2004-11-03 08:46:13 得分 0
看看Top




