Laravel 错误处理

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
        ];
posted @ 2019-01-24 15:34 懒牛拉车 阅读( ...) 评论( ...) 编辑 收藏
表情包
插入表情
评论将由博主筛选后显示,对所有人可见 | 还能输入1000个字符
相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页