CGI-PHP错误和重定向问题Wordpress MU

时间:2021-10-04 07:10:54

I installed wordpress Mu at http://www.optimalthinking.com/community/wp-admin/install.php

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

But when I visit http://www.optimalthinking.com/community/

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

I get

Security Alert! The PHP CGI cannot be accessed directly.

安全警报!无法直接访问PHP CGI。

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 CGI二进制文件是在启用了force-cgi-redirect的情况下编译的。这意味着只有在设置REDIRECT_STATUS CGI变量时才会提供页面,例如,通过Apache Action指令。

For more information as to why this behaviour exists, see the manual page for CGI security.

有关此行为存在的原因的详细信息,请参阅CGI安全性的手册页。

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.

有关更改此行为或重新启用此Web服务器的详细信息,请参阅此发行版附带的安装文件,或访问手册页。

Can anyone tell me what's the problem and how it can be fixed.

任何人都可以告诉我这是什么问题以及如何解决它。

Things I have tried so far:

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

  1. Reinstalled the WPMU
  2. 重新安装了WPMU

  3. http://mu.wordpress.org/forums/topic/5529
  4. http://trac.mu.wordpress.org/ticket/502
  5. Tried changing .htaccess
  6. 尝试改变.htaccess

All these things didnt yield any results. If * allows me, I would reward anybody who would fix this.

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

Thanks

3 个解决方案

#1


You need to fix your php.ini

你需要修复你的php.ini

Add/fix this line:

添加/修复此行:

force_cgi_redirect = 0

or, in latest PHP versions:

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

cgi.force_redirect = 0

Thanks to FAQTS and Google

感谢FAQTS和Google

#2


In my opinion it have something to do with your configuration, for some reasons script trying to redirect user to cgi-bin folder which is private.

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

#3


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

Cheers.

#1


You need to fix your php.ini

你需要修复你的php.ini

Add/fix this line:

添加/修复此行:

force_cgi_redirect = 0

or, in latest PHP versions:

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

cgi.force_redirect = 0

Thanks to FAQTS and Google

感谢FAQTS和Google

#2


In my opinion it have something to do with your configuration, for some reasons script trying to redirect user to cgi-bin folder which is private.

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

#3


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

Cheers.