gpt4 book ai didi

php - Apache 中的 PHP Curl 库出现 SSL 错误

转载 作者:太空宇宙 更新时间:2023-11-03 14:12:41 25 4
gpt4 key购买 nike

我有 RHEL 服务器,使用 Apache Web 服务器托管 PHP 网站。在一个网站中,我使用 PHP Curl 库连接到某些服务。这些服务使用 SSL (https)。

当我浏览任何使用 Curl 进行 SSL 调用的 PHP 页面时,出现以下错误:

Problem with the SSL CA cert (path? access rights?)

如果我在我的服务器上从命令行运行相同的 PHP 脚本,它工作正常。只有当我浏览它时,我才会遇到上述错误。

我已经尝试过http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/中给出的解决方案但它不起作用。

如果还有什么需要我做的,请告诉我。

最佳答案

如前所述,我尝试了 http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/ 给出的解决方案

但是,Apache 服务器即使在重新启动后也没有采用 php.ini 更改。当我重新启动我的 Linux 机器时,它工作了。看起来 Apache 可能在某处缓存 php.ini,并且只有通过重新启动机器才能清除它。

关于php - Apache 中的 PHP Curl 库出现 SSL 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27149746/

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