Home >Backend Development >PHP Tutorial >Why am I getting an SSLRead() Error with Curl POST Requests on OSX 10.10 and How Can I Fix It?
SSLRead() Error: Troubleshooting Curl POST Requests on OSX 10.10
Upgrading to OSX 10.10 Yosemite can lead to an SSLRead() error when attempting Curl POST requests to HTTPS URLs. This occurs due to cURL relying on Apple's Secure Transport, which may disable SSLv3 as a security measure.
Identifying the Issue
To confirm, execute the command:
$ php -i | grep "SSL Version"
You may see the following result:
SSL Version => SecureTransport
Resolving the Issue
To resolve this, install a version of PHP utilizing OpenSSL instead of SecureTransport.
Steps:
Add the required Homebrew taps:
$ brew tap homebrew/dupes $ brew tap homebrew/versions $ brew tap homebrew/php
Install curl with OpenSSL:
$ brew install --with-openssl curl
Install PHP using the newly installed curl:
$ brew install --with-homebrew-curl --with-httpd24 php55
The SSLRead() error should now be resolved.
The above is the detailed content of Why am I getting an SSLRead() Error with Curl POST Requests on OSX 10.10 and How Can I Fix It?. For more information, please follow other related articles on the PHP Chinese website!