I have new Laptop which has windows 11 installed. I have also install XAMPP which has php 8.2.12 version. Now i want to install composer in my system but it is not allowing me to install. It gives me error like
The Composer installer script was not successful [exit code 1].
OpenSSL failed with a 'certificate verify failed' error. This indicates a problem with
the Certificate Authority file(s) on your system, which may be out of date.
Certificate location [from openssl.cafile ini setting]:
C:xamppphpcacert.pem
The php.ini used by your command-line PHP is: C:xamppphpphp.ini
Script Output:
The "https://getcomposer.org/versions" file could not be downloaded: SSL operation
failed with code 1. OpenSSL Error messages:
error:0A000086:SSL routines::certificate verify failed
Failed to enable crypto
Failed to open stream: operation failed
I have change certificate file as suggest from CHAT GPT. as given below
curl.cainfo = "C:xamppphpcacert.pem"
openssl.cafile = "C:xamppphpcacert.pem"
I have also set environment variable PATH to C:XAMPPPHPPHP.exe and also check in CMD that it shows me PHP version 8.2.12 which is currently installed. I have also try to install composer manually using commands like
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
But it gives me error like below
Downloading...
The "https://getcomposer.org/versions" file could not be downloaded: SSL operation failed
with code 1. OpenSSL Error messages:
error:0A000086:SSL routines::certificate verify failed
Failed to enable crypto
Failed to open stream: operation failed
Retrying...
The "https://getcomposer.org/versions" file could not be downloaded: SSL operation failed
with code 1. OpenSSL Error messages:
error:0A000086:SSL routines::certificate verify failed
Failed to enable crypto
Failed to open stream: operation failed
Retrying...
The "https://getcomposer.org/versions" file could not be downloaded: SSL operation failed
with code 1. OpenSSL Error messages:
error:0A000086:SSL routines::certificate verify failed
Failed to enable crypto
Failed to open stream: operation failed
The download failed repeatedly, aborting.
Can anyone suggest me what to do with this issue?