3

I recently upgraded up version of PHP on my Mac from the default on El Capitan to 7.1. Since doing that, when I am attempting to make a request to a locally hosted web service I am getting the following error: cURL error 35: SSL: CA certificate set, but certificate verification is disabled. The service makes a curl request to a web page where the service interprets it and produces some data.

I think that I have tracked the error down to the fact that the SSL Version being used by PHP is SecureTransport. When I make the same requests to the same service hosted on an Ubuntu machine, there is no problems. The SSL Version being used on this machine is OpenSSL/1.0.2g.

I have tried using osx 10.10 Curl POST to HTTPS url gives SSLRead() error and https://www.farces.com/wikis/naked-server/php/php-7-openssl/ to try and get my local version of PHP to use OpenSSL and neither have been entirely successful. When I run php -i | grep "SSL Version" in my terminal, I get SSL Version => OpenSSL/1.0.2j but looking at <?php phpinfo(); ?>, I still get SSL Version SecureTransport.

Without throwing anymore aimless commands at my machine, is there a simple why that I can get the Apache version of PHP to also use OpenSSL instead of SecureTransport?

Community
  • 1
  • 1
Greeny8
  • 35
  • 5

1 Answers1

3

I am using plain curl on macOS and get the same error. curl -l https://www.ferrari.com. The solution is to install curl with openSSL using home brew.

brew install openssl-curl

Then you need to use this version of curl and build php yourself.

Try this one:

brew uninstall php56 && brew install php56 --with-homebrew-curl
HackerMonkey
  • 443
  • 3
  • 13
georgeok
  • 5,321
  • 2
  • 39
  • 61