1
votes

I have installed [email protected] using brew and added the path to my bash-profile. From Terminal I run "which openssl" and it shows the correct location (as in my bash-profile). Also when I run "openssl version" is shows 1.1.0f so that is also correct.

But when I run "composer diagnose" I get the following warning:

The OpenSSL library (0.9.8y) used by PHP does not support TLSv1.2 or TLSv1.1. If possible you should upgrade OpenSSL to version 1.0.1 or above.

I also ran "composer show --platform" and it shows:

lib-openssl 0.9.8.25 OpenSSL 0.9.8y 5 Feb 2013

What do I need to do to get Composer to use the correct version of OpenSSL?

I'm running: OSX 10.12.6, MAMP PHP 7.0.0, Composer 1.5.2, Brew 1.3.5

Any help would be appreciated.

UPDATE:

I tried adding symlinks as mentioned in many of the offered threads:

ln -s /usr/local/opt/[email protected]/lib/libcrypto.1.1.dyli /usr/local/lib/    
ln -s /usr/local/opt/[email protected]/lib/libssl.1.1.dylib /usr/local/lib/

It didn't work. PHP still shows:

OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 0.9.8zh 14 Jan 2016
OpenSSL Header Version => OpenSSL 0.9.8y 5 Feb 2013
Openssl default config => /System/Library/OpenSSL/openssl.cnf

I first tried to symlink from /System/Library/OpenSSL but it wasn't permitted. Maybe I need to sudo it. Before I do that, are there any risks I should be aware of? Am I on the right path? It's very frustrating that some commands in Terminal point to the new openssl, while others don't.

2

2 Answers

1
votes

This is exactly the issue I had.

I updated my OpenSSL per these instructions(the only way I found that worked on Mac OS High Sierra

Yet still, Composer showed an error

Then, I followed the instructions in this Video

Problem solved (finally, after 3 days of dead ends)

0
votes

Check PHP version your Mac OS shipping. It should like PHP 5.6.

Try to upgrade your version of PHP to 7.0 or above. And run command again check version on your current folder.

php -v

php -i | grep OpenSSL

If the output of php -v still doesn’t echoes the version 7, type following command to update your path.

export PATH=/usr/local/php5/bin:$PATH