cURL error 60: SSL certificate in Laravel 5.4

后端 未结 8 874
有刺的猬
有刺的猬 2020-12-02 20:47

Full Error

RequestException in CurlFactory.php line 187: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see ht

8条回答
  •  时光取名叫无心
    2020-12-02 21:28

    for Laravel: The 5 steps below will be helpful

    • update version to Guzzlehttp: 5.2
    • find the file under \vendor\guzzlehttp\guzzle\src\Client.php
    • edit default settings to

      protected function getDefaultOptions() { $settings = [ 'allow_redirects' => true, 'exceptions' => true, 'decode_content' => true, 'verify' => getcwd() .'/vendor/guzzlehttp/guzzle/src/cacert.pem' ]; }

    • download latest file cacert.pem from http://curl.haxx.se/ca/cacert.pem and place under /vendor/guzzlehttp/guzzle/src/

提交回复
热议问题