Home > Article > Backend Development > Why Does My Curl POST to HTTPS URL Fail with SSLRead() Error on OSX 10.10?
OSX 10.10 Curl POST to HTTPS URL Returns SSLRead() Error
This issue arises when PHP is compiled with a cURL version that utilizes Apple's Secure Transport in Yosemite, and the target HTTPS URL lacks SSLv3 support—a measure taken due to the POODLE vulnerability.
To verify if this is indeed the cause, execute the following command:
$ php -i | grep "SSL Version"
You're likely to encounter the following output:
SSL Version => SecureTransport
To resolve the issue, install a PHP version that employs a cURL version leveraging OpenSSL rather than SecureTransport. You can seamlessly accomplish this using Homebrew.
Tap the Homebrew repositories:
Install curl with OpenSSL:
Install PHP using the newly installed openssl curl:
Configure for Apache/Nginx:
Nginx (Caveat):
Start fpm:
Re-run the php -i | grep "SSL Version" command to confirm the change:
Upon executing these steps, the SSLRead() error should no longer persist.
The above is the detailed content of Why Does My Curl POST to HTTPS URL Fail with SSLRead() Error on OSX 10.10?. For more information, please follow other related articles on the PHP Chinese website!