看不懂的错误提示 晕了

masterdisk 2003-01-14 12:23:19
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.

这是刚刚配置完PHP的提示,请问是什么意思?怎么解决?
...全文
20 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
phpteam 2003-01-14
  • 打赏
  • 举报
回复
修改php.ini将cgi.force_redirect设为0,然后重起IIS
馮強 2003-01-14
  • 打赏
  • 举报
回复
除了楼上的可能外,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

注意根据你机器中的路径修改!


21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧