for last weeks really I try to install composer, but it keeps complaining about SSL-problems. I searched everywhere on Google and found lots of people having the same problems, but for some reason they found solutions which don't work here.
I really need to install composer, 'cause I like to use Craft 3, but whatever I try, it's not working. There is no composer-forum, and I guess all you guys needed to use composer to install Craft 3 too, so I hope somebody here can help. I'm really out of ideas at the moment...
I tried this:
SETUP VIA WINDOWS INSTALLER
- Download and run windows installer Composer 1.6.5: https://getcomposer.org/download/ I see the path is pointing to the right php.exe (and the same php I use on wamp server). I don't use a proxy.
- Running
composer
after install shows me composer is installed. - Running
composer diagnose
however shows me aWARNING
afterhttps connectivity to packagist
: The https://packagist.org/packages.json file could not be downloaded: SSL operation failed with code 1. - So in php I checked if php_openssl is enabled and it is.
- I also have this in my
php.ini
file, pointing to a cacert.pem certificate, downloaded from http://curl.haxx.se/ca/cacert.pem :openssl.cafile="C:\caCertificates\cacert.pem" openssl.capath="C:\caCertificates\"
- Running
php --ini
on cmdline I verified it's definitely the editedphp.ini
file that is active on command line/composer use (C:\wamp64\bin\php\php7.1.16) - I turned firewall off
- I even uninstalled wamp-server with all php-stuff and installed a complete fresh, updated, install of Wamp server (3.1.3 64b)
- But
composer diagnose
keeps throwing the warning, and composer is not working.
SETUP VIA PHP INSTALLER
Than I tried the php-install script I found on getcomposer.org and run this from command line:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
- It returns with:
Installer verified. All settings correct for using Composer. Downloading...
Composer (version 1.6.5) successfully installed to: C:\proj-folder\test\composer.phar
- But when I run composer diagnose
in that test-folder it's still throwing the warning.
BTW I tried above with administrative rights too.
I understand this has something to do with SSLv3, but whatever I tried, nothing seems to fix the issue. And again I tried a lot of things that worked for other people having this issue.
I'm out of ideas and composer obviously is not really helpful in showing a clue to what's the problem here.
Is there anybody here that can help me with this, or give me some direction on where to look? This is taking a lot of time and effort last weeks without luck and I'd like to start building websites with Craft 3 using composer!! Thanks!
cainfo
property to the path to the latest .pem file. That's really the only thing I had to change:curl.cainfo="C:\dev\cacert\cacert.pem"
– Brad Bell Jun 11 '18 at 18:56curl.cainfo
, but just checked it again. It's still set in php.ini and points to the right location of the certificate. Also checked the slashes. I disabled the firewall before, which didn't help. I also turned off full ESET protection, including anti-virus, but even then and in cmdline administrator modecomposer diagnose
still complains. Also curl extension is enabled. This thing is really starting to drive me insane. npm as well as yarn are running fine since day one without any problem, but not composer... Any more places to look? – Friksel Jun 12 '18 at 11:15composer -vvv self-update
... it says:Checked CA file C:\caCertificates\cacert.pem: valid
. So really, if composer says it is installed correctly and it can find the right cacert.pem file which also labels it as valid.... what else can there be wrong that keeps composer complaining? It seems everything is in place to me... – Friksel Jun 12 '18 at 12:02