How solve cURL error 60: SSL certificate in Laravel 5?

前端 未结 2 1630
-上瘾入骨i
-上瘾入骨i 2021-01-16 14:44

I\'m using \"FriendsOfPHP/Goutte\" Package https://github.com/FriendsOfPHP/Goutte For web crawling... When I use \"http://\" links then it\'s ran correctly but when I use \"

2条回答
  •  温柔的废话
    2021-01-16 15:30

    I think you have a certificate problem. It seems Goutte depends on Guzzle 4. And Guzzle can't find the proper certificate to verify a secure https request, see more about it here.

    Try to download this file: Bundle of CA Root Certificates . (Open and Save As).

    Then locate your php.ini file and add,or edit if it already exists, this line

    curl.cainfo = "[pathtothisfile]\cacert.pem"

提交回复
热议问题