【发布时间】:2017-02-15 10:45:35
【问题描述】:
PHP curl 不适用于 Amazon Linux 上的 https 请求。这是我卷曲 https url 时得到的结果:
curl -v https://google.com
Rebuilt URL to: https://google.com/
Trying 172.217.3.174...
Connected to google.com (172.217.3.174) port 443 (#0)
Initializing NSS with certpath: sql:/etc/pki/nssdb
Closing connection 0
curl: (77) Problem with the SSL CA cert (path? access rights?)
我尝试了不同的方法,但无法弄清楚问题所在。任何帮助将不胜感激。
【问题讨论】:
-
检查您是否在 php.ini 中启用了
php_openssl扩展 -
curl 二进制文件和 php curl 模块是独立的。这与 PHP 无关,因为您从 bash 调用 curl。
-
是的,但两者都使用相同的证书,问题出在我的证书上。
-
Stack Overflow 是一个编程和开发问题的网站。这个问题似乎离题了,因为它与编程或开发无关。请参阅帮助中心的What topics can I ask about here。也许Super User 或Unix & Linux Stack Exchange 会是一个更好的提问地方。另见Where do I post questions about Dev Ops?
标签: php curl redhat libcurl nss