美文网首页
php cURL error 60

php cURL error 60

作者: 零一间 | 来源:发表于2017-10-11 13:41 被阅读57次

    使用命令new来创建Symfony项目"symfony.framework"

    php symfony new symfony.framework
    

    一般会有这个错误:

    [GuzzleHttp\Exception\RequestException]
    cURL error 60: SSL certificate problem: unable to get local issuer certificate
    [GuzzleHttp\Ring\Exception\RingException]
    cURL error 60: SSL certificate problem: unable to get local issuer certificate
    

    解决方案:

    1.下载 cacert.pem

    https://curl.haxx.se/ca/cacert.pem
    

    2.在php.ini里面加上这个:

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

    curl.cainfo = "D:\phpStudy\php55n\cacert.pem"
    

    3.重新使用命令new来创建Symfony项目

    php symfony new symfony.framework
    

    此时创建成功!

    测试:

    $ php bin/console server:run
    
     [OK] Server listening on http://127.0.0.1:8000
    
     // Quit the server with CONTROL-C.
    
    image.png

    相关文章

      网友评论

          本文标题:php cURL error 60

          本文链接:https://www.haomeiwen.com/subject/mvhwyxtx.html