Skip to content

Instantly share code, notes, and snippets.

@ryanscherler
Last active August 16, 2018 20:06
Show Gist options
  • Save ryanscherler/fea4bb75379c1564df7e027c45615cc9 to your computer and use it in GitHub Desktop.
Save ryanscherler/fea4bb75379c1564df7e027c45615cc9 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
@tekamolo
Copy link

tekamolo commented Jul 5, 2018

@toddhuish sadly this is not working for me.

@jjwdesign
Copy link

I finally had success after many hours. I'm not sure if it was the order in which I uninstalled or installed brews, but I finally got it to work using the method over at "this-old-code" mentioned above. I'm not sure if my ~/.bash_profile changes made a different or not, but I'm posting them here for others. This was recommended by for the compiler after the "brew reinstall curl".

export PATH="/usr/local/opt/curl/bin:$PATH"
LDFLAGS: -L/usr/local/opt/curl/lib
CPPFLAGS: -I/usr/local/opt/curl/include
PKG_CONFIG_PATH: /usr/local/opt/curl/lib/pkgconfig

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