The reason for this problem is that OSX curl is used by default
SecureTransport
instead of OpenSSL.
The terminal can perform the following checks for the current SSL version with SecureTransport
or OpenSSL.
$ php -i | grep "SSL Version"
If the return result is as follows, Sslread () error is reported when Curl is used.
SSL Version => SecureTransport
You can make it support OpenSSL by recompiling curl.
Build Curl supports OpenSSL:
./configure--prefix=/usr/local/curl--without-nss--with-ssl=/usr/local/cellar/openssl/1.0.2d_1/
Make
Make install
If you do not add a curl extension in PHP, you can compile it in the following ways:
Add Curl Extension
Phpize
./configure--with-php-c/local/php-5.6.16/bin/php-config--with-curl=/usr/local/curl/
Make
Make install
The above describes the solution osx above PHP Curl Sslread error, including the error,curl aspects of the content, I hope that the PHP tutorial interested in a friend to help.