Reputation: 773
So I have tried all morning to install composer so I can start to use the laravel framework.
I am running windows server r2 standard 64bit with XAMPP on php 7.0
When running the Composer-Setup.exe I get the following message..
The "https://getcomposer.org/versions" 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 have scoured the net, and in most cases, the issue that I seem to be having is specifying a cacert.pem file..
So I followed instructions to download the cert from - https://curl.haxx.se/ca/cacert.pem
I simply made a .txt file, copied the content into it from the above link and renamed the file so it was cacert.pem file.
Then specified the .pem file inside the php.ini
openssl.cafile=C:\cacert.pem
Restard apache then re ran the setup.
After running it again, I get exactly the same error about ssl operation failed with code 1.
Hopefully someone can see what I am doing wrong here?
Upvotes: 12
Views: 10943
Reputation: 1
probably you are behind firewall with
In Windows you must find composer temp folder(User temp folder) setup and rename redirect https to http in file Composer-Setup.tmp
Upvotes: 0
Reputation: 10526
After none of the answers I found online worked for me, even downloading a fresh certificate bundle and updating my php.ini, what worked was to pass the certificate bundle as a command line option to the installer:
php composer-setup.php --cafile /usr/local/etc/ssl/certs/cacert.pem
Upvotes: 1
Reputation: 1684
You just have to uncomment this line in your php.ini
extension=php_openssl.dll
Upvotes: 2
Reputation: 196
is open_ssl enabled in php?
you may need to install open ssl using
apt-get install open-ssl
Upvotes: -1
Reputation: 5010
Upvotes: 2