zoukankan      html  css  js  c++  java
  • (转)解决OSX上面PHP curl SSLRead()

     

    原创 2016年05月19日 19:39:04

    这个问题的原因是因为OSX curl默认使用 SecureTransport 而不是OpenSSL.

    在终端可以执行以下检查当前SSL version用的是SecureTransport还是OpenSSL.

    $ php -i | grep "SSL Version"
    如果返回结果是如下,当用curl的时候会报SSLRead() error。
    SSL Version => SecureTransport

    可以通过重新编译curl使其支持OpenSSL. 

    编译curl支持openssl:

    下载curl源码包,然后切换到curl的源码包目录里
    ./configure --prefix=/usr/local/curl --without-nss --with-ssl=/usr/local/Cellar/openssl/1.0.2d_1/
    make
    make install

    PHP中如果没添加curl扩展可以通过以下方式编译添加:

    添加curl扩展
    phpize
    ./configure --with-php-config=/usr/local/php-5.6.16/bin/php-config --with-curl=/usr/local/curl/
    make
    make install

    ===

    https://stackoverflow.com/questions/38023809/how-to-update-php-curl-extension-in-linux-mac

  • 相关阅读:
    freopen
    字符
    map映射
    P3512 [POI2010]PIL-Pilots-洛谷luogu
    快读
    单调队列&单调栈
    简写
    邻接表&链式前向星
    mysql参数详解
    网络管理指南
  • 原文地址:https://www.cnblogs.com/showker/p/8933782.html
Copyright © 2011-2022 走看看