在使用laravel的过程中,调用一个接口总是出错,dd一看是这个错误cURL error 60: SSL certificate problem: unable to get local issuer certificate
,默认情况下cURL是不被信任任何CAS,出现CA的证书问题,在此记录一下解决步骤:
一、下载cacert.pem
进入官网,下载最新版(外网可能加载比较慢)
二、放入php文件下extras/ssl里面
三、配置php.ini
将curl.cainfo和openssl.cafile的路径配置成上面pem文件下载位置,注意将注释;
去掉,否则不生效