Skip to content

Instantly share code, notes, and snippets.

@hotmeteor
Forked from ryanscherler/php-openssl.md
Last active December 10, 2017 07:21
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hotmeteor/a86aae84b204053fd20cd5cd2806c5e6 to your computer and use it in GitHub Desktop.
Save hotmeteor/a86aae84b204053fd20cd5cd2806c5e6 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

Make sure you have XCode installed and have agreed to T&C.

Check OpenSSL version

php -i | grep "SSL Version"

You'll likely see this:

SSL Version => SecureTransport

Stop Valet

valet stop

Swap with OpenSSL via Homebrew

If your console barks and give you alternate instructions on upgrading libraries, go ahead.

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

Check OpenSSL version

php -i | grep "SSL Version"
SSL Version => OpenSSL/1.0.2j

Start Valet, if it all looks good.

valet start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment