1

我正在运行 janrains php5 php-openid 的检测脚本,但我一直遇到这个错误。

Query Corruption
================

Your web server seems to corrupt queries.  Received , expected a=%26b.
Check for mod_encoding.

还有这个

HTTP Fetching
=============

This PHP installation has support for libcurl. Good.

An HTTP request was completed. *An unexpected URL was returned:
<https://gist.github.com/raw/465630/c57eff55ebc0c54973903af5f72bac72762cf4f4/helloworld>.*

Your PHP installation appears to support SSL, so it will be able to process
HTTPS identity URLs and server URLs.

我在 mod 文件夹上找到了 mod_encoding 并启用了它,但我不确定如何处理它,因为我似乎无法轻松找到有关它的文档。我正在为 debian lenny 运行最新的 apache php。我回家后会有特定的版本!谢谢!!

4

1 回答 1

2

关于意外的 URL:detect.php 的第 437 和 438 行(至少在我几天前下载的版本中)设置了它尝试获取的 URL 以及它期望重定向到的 URL:

$fetch_url = 'http://www.openidenabled.com/resources/php-fetch-test';
$expected_url = $fetch_url . '.txt';

所以它预计http://www.openidenabled.com/resources/php-fetch-test将被重定向到http://www.openidenabled.com/resources/php-fetch-test.txt. 但正如您所看到的,如果您在浏览器中访问第一个 URL,则不会发生这种情况。我的猜测是,它是在某个时候以这种方式设置的,后来行为发生了变化,但没有人更新 detect.php 脚本。

事实上,看起来 www.openidenabled.com 域中的任何 URL(或至少我尝试过的所有少数 URL)都将重定向到http://www.janrain.com/openid-enabled.

对此,您可以做几件事。最简单的方法是忽略它,因为事情很可能按预期运行,您不会遇到任何问题。(我在运行时收到相同的消息,detect.php并且我的代码可以正常工作。)

如果您想成为一个好公民,请在项目中记录一个错误。

If you want, you can set up your own redirect test or find URLs that are redirecting and change the value of $fetch_url and $expected_url in the detect.php script appropriately. Or leave $fetch_url as is but change the $expected_url value to http://www.janrain.com/openid-enabled.

But in short, it's probably the case that nothing is wrong with your setup.

于 2011-04-24T03:40:19.487 回答