Composer self-update does not work on OSX
OSX has XAMPP installed with PHP 5.6.3.
composer self-update
and
composer update
with the message:
[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
There is something wrong with the openssl installation or certificates. How can I fix this?
+3
source to share
2 answers
I suggest the following steps:
- enable OpenSSL extension in
php.ini
-extension=php_openssl.so
-
make sure you have SSL certificates configured in
php.ini
curl.cainfo=/full/path/to/ssl/certs/ca-bundle.crt openssl.cafile=/full/path/to/ssl/certs/ca-bundle.crt
If the certificates are missing download http://curl.haxx.se/ca/cacert.pem and rename to ca-bundle.crt
Reload PHP after changing php.ini and try running composer commands again.
+5
source to share