Skip to content

Instantly share code, notes, and snippets.

@jconroy
Forked from ryanscherler/php-openssl.md
Created September 2, 2017 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jconroy/14bdc9e4ab7d13231a1dced430f5774f to your computer and use it in GitHub Desktop.
Save jconroy/14bdc9e4ab7d13231a1dced430f5774f 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