Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install composer due to certificate issues

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?

like image 937
SK2017 Avatar asked Dec 15 '16 12:12

SK2017


People also ask

Why is composer not installing?

Make sure you have no problems with your setup by running the installer's checks via curl -sS https://getcomposer.org/installer | php -- --check . Try clearing Composer's cache by running composer clear-cache . Ensure you're installing vendors straight from your composer.

How do I install composer on Windows 10 64 bit?

Find the Composer-Setup.exe file in your Downloads directory and double-click it to open the installer and launch the set-up process. Select 'Install for all users (recommended). ' Do not check the Developer mode checkbox, click Next.

How do I manually install a composer?

Step 1: Navigate to the official composer website. Step 2: Then click on the Download button. Step 3: Then click on the Composer-Setup.exe & download the file. Step 4: Then click on “Install for all users”.


1 Answers

You just have to uncomment this line in your php.ini

extension=php_openssl.dll
like image 67
Paul Santos Avatar answered Sep 30 '22 04:09

Paul Santos