Skip to content

Instantly share code, notes, and snippets.

@dannygsmith
Forked from ryanscherler/php-openssl.md
Created August 30, 2017 03:32
Show Gist options
  • Save dannygsmith/a0d00f207e90c71f32a9426ce1b85f54 to your computer and use it in GitHub Desktop.
Save dannygsmith/a0d00f207e90c71f32a9426ce1b85f54 to your computer and use it in GitHub Desktop.
Use Homebrew PHP with OpenSSL instead of SecureTransport

This issue is noted here: https://deliciousbrains.com/wp-migrate-db-pro/doc/ssl-errors/

Original reference for this fix is from: http://stackoverflow.com/questions/26461966/osx-10-10-curl-post-to-https-url-gives-sslread-error/26538127#26538127

Check OpenSSL version

php -i | grep "SSL Version"

You'll likely see this:

SSL Version => SecureTransport

Swap with OpenSSL via Homebrew

brew uninstall php71-mcrypt
brew uninstall php71
brew install --with-openssl curl
brew install --with-homebrew-curl php71
brew install php71-mcrypt

Check OpenSSL version

php -i | grep "SSL Version"
SSL Version => OpenSSL/1.0.2j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment