Laravel 错误处理
错误提示:cURL error 60: SSL certificate problem: unable to get local issuer certificate
解决方案:修改文件,重启队列即可
D:\wamp\www\myblog\vendor\guzzlehttp\guzzle\src\Client.php 大概160行
$defaults = [
'allow_redirects' => RedirectMiddleware::$defaultSettings,
'http_errors' => true,
'decode_content' => true,
'verify' => false,
'cookies' => false
];
或者
$defaults = [
'allow_redirects' => RedirectMiddleware::$defaultSettings,
'http_errors' => true,
'decode_content' => true,
// 'verify' => true,
'verify' => base_path().'/vendor/composer/ca-bundle/res/cacert.pem',
'cookies' => false
];
如果项目里面没有cacert.pem文件可以去下载一个,然后放到php目录
下载地址:https://curl.haxx.se/docs/caextract.html
$defaults = [
'allow_redirects' => RedirectMiddleware::$defaultSettings,
'http_errors' => true,
'decode_content' => true,
// 'verify' => true,
'verify' => 'D:\wamp\bin\php\php7.3.1\extras\ssl\cacert.pem',
'cookies' => false
];