gpt4 book ai didi

php - PHP OpenID 上的 HTTP 获取失败

转载 作者:搜寻专家 更新时间:2023-10-31 22:10:18 25 4
gpt4 key购买 nike

我已将 php v5 openid 库放入站点并运行 detect.php,但在“HTTP 提取”时失败(在本消息末尾报告)。 discovery.php 也失败了。服务器在 HTTPS 上运行并添加了所有需要的库,因此应该可以正常工作 - 就像我在其他服务器上实现它一样。

任何运行 consumer/try_auth.php 的尝试都会失败并出现错误“不是有效的 OpenID”,这显然是由 http 获取失败引起的。

如有任何指点,我们将不胜感激。

OpenID Library Support Report

This script checks your PHP installation to determine if you are set up to use the JanRain PHP OpenID library.

Setup Incomplete

Your system needs a few changes before it will be ready to run the OpenID library.

Math support

Your PHP installation has gmp support. Good.

Cryptographic-quality randomness source

Using (insecure) pseudorandom number source, because Auth_OpenID_RAND_SOURCE has been defined as null.

Data storage

No SQL database support was found in this PHP installation. See the PHP manual if you need to use an SQL database. The library supports the MySQL, PostgreSQL, and SQLite database engines, as well as filesystem-based storage. In addition, PEAR DB is required to use databases.

If you are using a filesystem-based store or SQLite, be aware that open_basedir is in effect. This means that your data will have to be stored in one of the following locations:

'' If you are using the filesystem store, your data directory must be readable and writable by the PHP process and not available over the Web.

HTTP Fetching

This PHP installation has support for libcurl. Good.

Fetching URL failed!

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

XML Support

XML parsing support is present using the Auth_Yadis_dom interface.

Query Corruption

Your web server does not corrupt queries. Good.

最佳答案

此错误已被抛出,因为在 Auth_Yadis_ParanoidHTTPFetcher 上使用 curl_getinfo 时 SSL 验证失败。要解决此问题,您应该通过添加此选项来禁用 SSL 验证:

curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);

到第 93 行的 Auth/Yadis/ParanoidHTTPFetcher.php(在 $c = curl_init(); 之后);

希望这对您有所帮助。

关于php - PHP OpenID 上的 HTTP 获取失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13681621/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com