php cURL 错误 60:尝试使用 symfony 时出现 ssl 认证问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37997669/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
cURL error 60: ssl certification issue when attempting to use symfony
提问by colin rickels
I have recently gotten a new windows computer and have installed the php symfony framework.
我最近得到了一台新的 Windows 计算机并安装了 php symfony 框架。
When attempting to use the new command C:> php symfony new blog
I receive the error message [GuzzleHttp\Ring\Exception\RingException] cURL error 60: SSL certificate problem: unable to get local issuer certificate
.
尝试使用新命令时,C:> php symfony new blog
我收到错误消息[GuzzleHttp\Ring\Exception\RingException] cURL error 60: SSL certificate problem: unable to get local issuer certificate
。
I am clueless on what to do in this instance as I am not too experienced with the CMD interface.
我对在这种情况下该怎么做一无所知,因为我对 CMD 界面不太熟悉。
I need to know if this is an error with windows or with symfony itself and any possible routes I could take in fixing it.
我需要知道这是否是 Windows 或 symfony 本身的错误以及我可以采取的任何可能修复方法。
回答by Mokhtar Tlili
Follow thislink, Copy the entire page and save it in a: "cacert.pem
"
按照此链接,复制整个页面并将其保存在:“ cacert.pem
”
Then in your php.ini
file insert or edit the following line: curl.cainfo = "[pathtothisfile]\cacert.pem"
然后在您的php.ini
文件中插入或编辑以下行: curl.cainfo = "[pathtothisfile]\cacert.pem"
Or
或者
use composerinstead Symfony installer
使用composer代替 Symfony 安装程序
回答by Francine H.
I had the same error with the php version 7.0.10
我在 php 版本 7.0.10 上有同样的错误
The mistake I did was that I copyied the certificate (cacert.pem)
in the wrong php.ini
file. I mean, I have 3 type of ini file: php-development.ini
, php-production.ini
and php.ini
我犯的错误是我将证书复制到(cacert.pem)
了错误的php.ini
文件中。我的意思是,我有 3 种类型的 ini 文件:php-development.ini
,php-production.ini
和php.ini
and the right one was php.ini
正确的是 php.ini
Make sure you put the path of the certificate in the right one.
确保将证书的路径放在正确的路径中。
And it will work ! ;) lovely symfony <3
它会起作用!;) 可爱的 symfony <3
FH
跳频
回答by css.cutter
you can try the the command line below,it's worked for me
你可以试试下面的命令行,它对我有用
composer create-project symfony/framework-standard-edition my_project_name "2.8.*"