1
votes

Hey guys trying to install the slim php api framework locally via composer but everytime I try to run

composer require slim/slim "^3.0"

the following error happens:

[Composer\Downloader\TransportException]
The "https://getcomposer.org/version" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed

I am doing all of this on my mac running macOS and have no idea how to solve this issue can anyone help me

1

1 Answers

1
votes

It's an OpenSSL issue. You can download root certificates with

wget https://curl.haxx.se/ca/cacert.pem

then edit openssl.cafile parameter in your php.ini configuration file:

openssl.cafile=/path/to/cacert.pem

If you aren't able to do it you can use composer's disable-tls option.

composer config -g -- disable-tls true

Enabling this is a security risk and is NOT recommended.