【问题标题】:CGI-PHP error and Redirection Issue Wordpress MUCGI-PHP 错误和重定向问题 Wordpress MU
【发布时间】:2009-06-05 21:40:59
【问题描述】:

我在http://www.optimalthinking.com/community/wp-admin/install.php安装了wordpress Mu

但是当我访问http://www.optimalthinking.com/community/

我明白了

安全警报! PHP CGI 不能 直接访问。

这个 PHP CGI 二进制文件是用 启用强制 cgi 重定向。这表示 只有在以下情况下才会提供页面 REDIRECT_STATUS CGI 变量是 设置,例如通过 Apache 操作 指令。

如需详细了解为什么会这样 行为存在,请参阅手册页 用于 CGI 安全性。

有关更改的更多信息 此行为或重新启用此 webserver,咨询安装 此发行版附带的文件, 或访问手册页。

谁能告诉我问题出在哪里以及如何解决。

到目前为止我尝试过的事情:

  1. 重新安装了 WPMU
  2. http://mu.wordpress.org/forums/topic/5529
  3. http://trac.mu.wordpress.org/ticket/502
  4. 尝试更改 .htaccess

所有这些事情都没有产生任何结果。如果stackoverflow允许我,我会奖励任何能解决这个问题的人。

谢谢

【问题讨论】:

    标签: php apache wordpress cgi-bin


    【解决方案1】:

    您需要修复您的 php.ini

    添加/修复这一行:

    force_cgi_redirect = 0
    

    或者,在最新的 PHP 版本中:

    cgi.force_redirect = 0
    

    Thanks to FAQTS and Google

    【讨论】:

      【解决方案2】:

      在我看来,这与您的配置有关,由于某些原因,脚本试图将用户重定向到私有的 cgi-bin 文件夹。

      【讨论】:

        【解决方案3】:

        来自http://us3.php.net/security.cgi-bin

        PHP CGI with VirtualHosts.
        
        This is what I found out while trying to get php to work as CGI with Apache VirtualHosts.
        
        By enabling 'force-cgiredirects', you *must*:
        1) set 'cgi.fix_pathinfo=1' in php.ini
        2) leave doc_root commented out (php.ini also)
        
        If you miss item 1, the apache logs will show 'unexpected T_STRING' in the php binary.
        If you miss item 2, you'll only see 'No input file specified.', instead of the expected output.
        
        You can then turn on the php support for a particular vhost by defining:
        
        Action php-script /cgi-bin/php
        
        inside the corresponding <VirtualHost> directive.
        

        干杯。

        【讨论】:

          猜你喜欢
          • 2013-04-16
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2017-12-22
          相关资源
          最近更新 更多