laravel:cURL错误60:SSL证书无法获取本地颁发者证书 [英] laravel : cURL error 60: SSL certificate unable to get local issuer certificate

查看:311
本文介绍了laravel:cURL错误60:SSL证书无法获取本地颁发者证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Ubuntu:15.04

Ubuntu: 15.04

Laravel:5.4.32

Laravel: 5.4.32

GuzzleHttp \ Guzzle:〜6.0

GuzzleHttp\Guzzle: ~6.0

你好

当我尝试使用Laravel的内置身份验证重置密码时出现以下错误.当我输入我的电子邮件并点击重置时,我得到...

I have the following error when I am trying to reset a password using Laravel's built in authentication. When I enter my email and hit reset I get...

GuzzleHttp\Exceptions\RequestException cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

GuzzleHttp\Exceptions\RequestException cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

我已经用这个错误搜索了它,并且从我读过的所有内容中我尝试了以下方法,但是所有这些方法都没有起作用...

I have googled this error and it from everything I have read I have tried the following, all of which have not worked...

  • 运行phpinfo()来找到正确的php.ini
  • 更新了curl.cainfo php.ini设置为"/etc/ssl/certs/cacert.pem"
  • 更新了 将curl.cainfo php.ini设置更改为"/etc/ssl/certs/ca-certificated.crt"
  • 将openssl.cafile php.ini设置更新为"/etc/ssl/certs/cacert.pem"
  • 将openssl.cafile php.ini设置更新为"/etc/ssl/certs/ca-certificated.crt"
  • Ran phpinfo() to find the correct php.ini
  • Updated the curl.cainfo php.ini settings to "/etc/ssl/certs/cacert.pem"
  • Updated the curl.cainfo php.ini settings to "/etc/ssl/certs/ca-certificated.crt"
  • Updated the openssl.cafile php.ini settings to "/etc/ssl/certs/cacert.pem"
  • Updated the openssl.cafile php.ini settings to "/etc/ssl/certs/ca-certificated.crt"

每次我重新启动apache之后,都无济于事.

After each I have restarted apache, however, nothing has worked.

我也跑过var_dump(openssl_get_cert_locations());,这给了我以下内容...

I have also ran var_dump(openssl_get_cert_locations()); which gave me the following...

[
    "default_cert_file" => "/usr/lib/ssl/cert.pem", 
    "default_cert_file_env" => "SSL_CERT_FILE",
    "default_cert_dir" => "/usr/lib/ssl/certs",
    "default_cert_dir_env" => s"SSL_CERT_DIR",
    "default_private_dir" => "/usr/lib/ssl/private",
    "default_default_cert_area" => "/usr/lib/ssl",
    "ini_cafile" => "/etc/ssl/certs/ca-certificates.crt",
    "ini_capath" => "/etc/ssl/certs" ,
]

任何人都可以给我一些想法尝试吗?我想念什么?

Can anyone give me some ideas to try? What am I missing?

谢谢

推荐答案

我遇到了类似的问题.无需更改/vendor/guzzlehttp/guzzle/src/Client.php

I had the similar problem. No need to change /vendor/guzzlehttp/guzzle/src/Client.php

也许这可以为您提供帮助.

Maybe this can help you.

  1. https://curl.haxx.se/下载cacert.pem文件docs/caextract.html
    将cacert.pem放在您喜欢的地方.

  1. Download cacert.pem file from https://curl.haxx.se/docs/caextract.html
    Put the cacert.pem somewhere you like.

编辑php.ini

两行:

curl.cainfo=D:/Servers/php/sslfiles/cacert.pem  
openssl.cafile=D:/Servers/php/sslfiles/cacert.pem  

  1. 重新启动apache httpd.

这篇关于laravel:cURL错误60:SSL证书无法获取本地颁发者证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆