电脑爱好者,提供IT资讯信息及各类编程知识文章介绍,欢迎大家来本站学习电脑知识。 最近更新 | 联系我们 RSS订阅本站最新文章
电脑爱好者
站内搜索: 
当前位置:首页>> PHP>>出错提示:Security Alert! The PHP CGI cannot be accessed directly:

出错提示:Security Alert! The PHP CGI cannot be accessed directly

来源:www.cncfan.com | 2006-3-17 | (有3334人读过)

c. 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.
-----------------------------------------------------------------------------------------

修改php.ini将cgi.force_redirect设为0,然后重起IIS


---------------------------------------------------------------

除了楼上的可能外,Apache默认目录权限未配置也会造成该提示生效。
修改Apache Conf目录httpd.conf

<Directory />
Options None
AllowOverride All
Order allow,deny
Allow from all
</Directory>

把PHP配置成二进制CGI绑定
ScriptAlias /php/ "d:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

若不想配置成CGI方式,可以用模块方式配置
LoadModule php4_module d:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php

注意根据你机器中的路径修改!
PHP热门文章排行
网站赞助商
购买此位置

 

关于我们 | 网站地图 | 文档一览 | 友情链接| 联系我们

Copyright © 2003-2024 电脑爱好者 版权所有 备案号:鲁ICP备09059398号