[英]cURL error 60 not disappearing
I'm trying to connect the google/apiclient to my web application.我正在尝试将 google/apiclient 连接到我的网络应用程序。 I'm using it to allow members to sign in with their Google accounts.
我正在使用它来允许成员使用他们的 Google 帐户登录。 So far, I can reach the Request for Permission Google page where Google asks the user if they will allow their information to be shared with my application.
到目前为止,我可以访问 Google 许可请求页面,在该页面中,Google 询问用户是否允许与我的应用程序共享他们的信息。 When I click on the allow button, The following happens
当我单击允许按钮时,会发生以下情况
I've researched extensively and I've found several posts that suggest that this problem shows up when your CA root certificates are missing or out-of-date.我已经进行了广泛的研究,我发现一些帖子表明当您的 CA 根证书丢失或过期时会出现此问题。 The proposed solution is to:
建议的解决方案是:
Following those instructions seems to work for other developers but my error does not disappear.遵循这些说明似乎适用于其他开发人员,但我的错误并没有消失。 Are there other settings that need to be updated or changed?
是否还有其他设置需要更新或更改? What else can I do?
我还可以做些什么? Where did I go wrong?
我哪里做错了?
The correct answer is indeed to download the cacert.pem file and update the php.ini files as suggested by Morfinismo.正确的答案确实是下载 cacert.pem 文件并按照 Morfinismo 的建议更新 php.ini 文件。
But even after that the error did not disappear.但即使在那之后,错误也没有消失。 The trick was getting a clean copy of the PEM file!
诀窍是获得 PEM 文件的干净副本! Any method involving windows notepad or other editors corrupts the file and gives the cURL error 60 etc. Finally, I found https://gist.github.com/VersatilityWerks/5719158/download and downloaded a tar file with a clean copy of the cacert.pem file ...... it then all worked perfectly.
任何涉及 Windows 记事本或其他编辑器的方法都会损坏文件并给出 cURL 错误 60 等。最后,我找到了https://gist.github.com/VersatilityWerks/5719158/download并下载了一个带有 cacert 干净副本的 tar 文件.pem 文件......然后一切正常。
I also made the following changes in WAMP SERVER:我还在 WAMP SERVER 中进行了以下更改:
Hope this saves others time.希望这可以节省其他人的时间。
WAMP has two directories that need an update. WAMP 有两个需要更新的目录。
C:\\wamp\\bin\\apache\\apacheversion\\bin\\php.ini
C:\\wamp\\bin\\php\\phpversion\\php.ini
. C:\\wamp\\bin\\php\\phpversion\\php.ini
。 Open both files, look for the line curl.cainfo =
and include the path to the certificate you've downloaded, restart the services and it should work.打开这两个文件,查找
curl.cainfo =
行并包含您下载的证书的路径,重新启动服务,它应该可以工作。
I hope this helps!我希望这有帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.