Composer setup installation error
Solution 1
OpenSSL is being loaded twice. Look in your php.ini above to see openssl.dll, and comment it out in one of the places.
– Farkie
Solution 2
I guess this is a problem which had been asked here you can follow the solution or go to the below link whichever if you want.
I figured it out and successfully installed Composer in My windows 10 PC.
There are some steps you have to follow in order to solve your problem.
1st solution.
- Find and Open
php.ini
located in your "php" folder In my case it is in xampp the file is inc:\xampp\php\
- Find
"extension=php_openssl.dll"
-
";extension=php_openssl.dll"
uncomment by removing the semicolon";"
- Restart your xampp , now extension should be loaded after that.
- Try again now you are able to install composer.
2nd solution(If the above solution not work for you then go with below solution . )
This works in my case
-
Find and Open
php.ini
located in your "php" folder In my case it is in xampp the file is inc:\xampp\php\
-
Open SHELL from Xampp start panel by clicking on shell button.
-
Write
php
in shell and hit enter -
If you get some waring message in your shell something like below .
-
Then you have to fix these waring message by commenting all these extension in your
php.ini
file.(Actually cause of these warning messages are because more than one times that extension are enabled or you can say un-commented inphp.ini
file).For Example which is in my case.
a). You can see in above image there is warning message for curl.
Module 'curl' already loaded in Unknown on line 0 .
b) To fix this find
php_curl.dll
file in yourphp.ini
file and comment that extension by adding semicolon";"
in front of that extension like this;extension=php_curl.dll
Follow above steps if you have more than one warning for each extension untill you are not getting any warning message in your shell.
- Restart your xampp , now extension should be loaded after that.
- Try again now you are able to install composer.
Solution 3
- Go to your xampp\php\php.ini
- Press ctrl+f to find extension_dir and change its relative path to absolute path e.g from extension_dir="\ext" to extension_dir="E:\xampp\php\ext"
- Press ctrl+f to find browscap and change its path e.g from
browscap="\xampp\php\extras\browscap.ini" to
browscap="E:\xampp\php\extras\browscap.ini" - Save the file and restart the xampp
try again with the composer installer
rango
Updated on July 28, 2021Comments
-
rango almost 3 years
I'm trying to install Composer on Windows 7 and XAMPP, but getting those errors/messages when run installation setup.
The PHP exe file you specified did not run correctly: C:\xampp\php\php.exe
The php.ini used by your command-line PHP is: C:\xampp\php\php.ini
A duplicate setting in your php.ini could be causing the problem.
Program Output: Warning: Module 'openssl' already loaded in Unknown on line 0
I have been googled for while, but could not find proper solution or anything related to this. Closest thing was to remove comment openssl extension in php.ini file, but did not worked for me. To be clear I have very basic understanding of server tweaking.
-
Manfred Radlwimmer about 7 yearsPlease don't add the same answer to multiple questions. Answer the best one and flag the rest as duplicates, once you earn enough reputation. If it is not a duplicate, tailor the post to the question
-
rango about 7 yearsThank you for your response, the first comment above solved my problem.
-
Amit Kumar about 7 years@gorans93 @ You're welcome , as of now your problem is solved please mark it as solved and give thumbs up for the solutions . Happy coding !!! (amitamie.com) :-) ;-)