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?