Composer Warning: openssl extension is missing. How to enable in WAMP - php

Trying to install Composer dependency management tool on Win7/64 + WampServer 2.2 via the Setup Installer and I am getting the following message:
The openssl extension is missing, which will reduce the security and stability of Composer.
If possible you should enable it or recompile php with --with-openssl
So here is what I did...
From my Wamp icon in Tray, clicked php > php extensions > php_openssl
This showed that task was completed by placing a check mark beside the extension
I then restarted WampServer
Then from the Wamp icon in tray, I clicked php > php.ini and searched for openssl to verifiy it was NOT commented) out. It was not.
I then went back to Composer-Setup.exe and tried again. Same Warning Message: "openssl extension is missing"
Having never worked with OpenSSL, I'm not sure what is supposed to be set, so I tried to browse to one of my local sites using https. It Failed.
What am I missing?
Please advise.

WAMP uses different php.ini files in the CLI and for Apache. when you enable php_openssl through the WAMP UI, you enable it for Apache, not for the CLI.
You need to modify C:\wamp\bin\php\php-5.4.3\php.ini to enable it for the CLI.

In addition to uncommenting the ;extension=php_openssl.dll line in php.ini that everyone else has mentioned, you also have to ensure the ;extension_dir = "ext" line is also uncommented. To uncomment, remove the prefixed semicolon and save.
That line might already be uncommented in packages like WAMP and XAMPP, but it's not in a plain PHP download for Windows, so it's worth verifying. Also, you have to create the php.ini file by copying one of the examples, like php.ini-development to a new file and then name it php.ini. Then make these changes there.
Also, in the future, to install tools such as PHP and Composer, I recommend using the Chocolatey package manager. Then it's as simple as choco install composer. Of course, you'd still need to edit php.ini before installing Composer with the choco method. In future versions of Windows, package management tools like Chocolatey will be baked into Windows, the same way apt-get is in Ubuntu. Exciting times ahead for developers!
With either method, after installing Composer, don't forget to restart your terminal. Whether you're using Command Prompt, Bash (installs with Git), or Powershell, you'll need to restart it before the updated environmental variables work.

I had the same problem even though openssl was enabled. The issue was that the Composer installer was looking at this config file:
C:\wamp\bin\php\php5.4.3\php.ini
But the config file that's loaded is actually here:
C:\wamp\bin\apache\apache2.2.22\bin\php.ini
So I just had to uncomment it in the first php.ini file and that did the trick. This is how WAMP was installed on my machine by default. I didn't go changing anything, so this will probably happen to others as well. This is basically the same as Augie Gardner's answer above, but I just wanted to point out that you might have two php.ini files.

uncomment ;extension=php_openssl.dll in both
wamp\bin\php\php5.4.12\php.ini
wamp\bin\apache\Apache2.4.4\bin\php.ini
it will work

C:\laravel-master>composer create-project laravel/laravel
Installing laravel/laravel (v4.0.6)
- Installing laravel/laravel (v4.0.6)
[RuntimeException]
You must enable the openssl extension to download files via https
I'm using EasyPhp (WAMP type). In the EasyPHP Icon in the taskbar, right click and select configuration then select PHP. I will open the PHP.ini file configuration in a Notepad, search-find or CTRL+F in notepad for the word OPENSSL you will find this ;extension=php_openssl.dll just remove the ; and the extension=php_openssl.dll is active.
C:\laravel-master>composer create-project laravel/laravel
Installing laravel/laravel (v4.0.6)
- Installing laravel/laravel (v4.0.6)
Downloading: 100%
Created project in C:\laravel-master\laravel
Loading composer repositories with package information
Installing dependencies (including require-dev)

you need to edit the "c:\Program Files\wamp\bin\php\php5.3.13\php.ini" file
search for:
;extension=php_openssl.dll
remove the semicolon at the beginning
note: if saving the file doesn't work then you need to edit it as administrator. (on win7) go to start menu, search for notepad, right-click on notepad, click "Run As Administrator"
in the composer installation windows just click back then next (or close it and start again) and it should work

opened wamp/bin/apache/apache2.4.4/bin/php config..
wamp/bin/php/php5.4.16/php conf settings, php-ini production, php-ini dev, phpForApache find extension=php_openssl.dll and uncomment by removing ;

Short and sweet, uncomment this line in wamp/bin/php/php5.3.13(or whatever php version):
;extension=php_openssl.dll (remove the ;)
Now run the command line installation of Composer. You won't have an error.
Good to go!

You should make a symlink to php.ini. Sorry for russian link.

Yes, you must have to open php.ini and remove the semicolon to:
;extension=php_openssl.dll
remove the ";" like this and it will work.
extension=php_openssl.dll
Happy Coding.

For installing Composer below steps worked me:(WAMP version 2.4 x64bit)
edit ->
**C:\wamp\bin\php\php5.4.12\php.ini**
;;uncomment below line or remove the semicolons ';'
extension=php_openssl.dll
**C:\wamp\bin\apache\Apache2.4.4\bin\php.ini**
extension=php_openssl.dll

All those answers are good, but in fact, if you want to understand, the extension directory need to be right if you want all you uncommented extensions to work. Can write a physical or relative path like
extension_dir = "C:/myStack/php/ext"
or
extension_dir = "../../php/ext"
It's relative to the httpd.exe Apache web server (C:\myStack\apache\bin)
But if you want it to work with Composer or anything you need the physical path because the cli mode doesn't use the web server !

I was facing the same issue. I renamed my php folder from php7_winxxxx to just php and it worked fine. It looked like composer was checking the location to the php_openssl module in c:/php/ext.
You may also need to add c:/php to the PATH in environment variable

Related

Composer setup installation error

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.
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 in c:\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 in c:\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 in php.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 your php.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.
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
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
For the sake of google indexing,
I write the error I had
If Composer doesn't install in windows 7, 8, 10 with php provided in the xampp installation with this error message
The PHP exe file you specified did not run correctly:
yourPathTo\php.exe
The program failed to run correctly. Try reinstalling the program to fix this problem. Make sure you have installed the appropriate Visual C++ Redistributable.
The Composer message really confused me for the part of Visual C++, in fact it was not the case
Well, after long searches, I finally have found the Sarim' solution that you find in this same thread
Composer setup installation error
This specific issue is due to the php.ini which is default provided by the xampp installation which as highlighted by Sarim, does have paths relative to xampp installation and won't allow Composer-Setup.exe to properly run.
If you already have a composer and you need to update it, you can use this command line :
composer self-update
This working for me.
maybe if you were following how to install php guide such as this one it directs you to uncomment the extension_dir = [to your installation folder]. then if you install Composer it will give you the complaint.
Solution : comment the extension_dir line in you php.ini file and continue with your installation

install composer fails in windows 10 The openssl extension is missing

openssl missing whene install composer
my windows: 10
local server: UwAmp
I've activated openssl in :
C:\UwAmp\bin\apache\php.ini
C:\UwAmp\bin\php\php-5.4.31\php.ini-development & php.ini-production (2 files) by delete - ; -
As well as from UwAmp GUI
But
This problem is not solved
The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl
Thank you
I ran into the same issue installing Composer with MAMP for Windows 10. My php.ini file was not in the same directory as php.exe. I'm guessing Composer doesn't know to look elsewhere for the ini.
Try making a copy of your php.ini from C:\UwAmp\bin\apache\php.ini, pasting it into C:\UwAmp\bin\php\php-5.4.31, and then try to run the Composer setup again. Confirm that extension=php_openssl.dll is not commented out with a ;.
Copy php.in from php dir to Apache24/bin works for me. Please make sure you enable the extension in there.
Composer has nothing to do with apache, so C:\UwAmp\bin\apache\php.ini doesn't matter.
php.ini-development and php.ini-production are sort of examples to get started with. So you should choose one (probably development) and rename it to php.ini for it to actually work.

Install Composer on MAMP on Windows

So here is the issue I'm getting:
I'm trying to install Composer and I'm using MAMP on Windows (it does exist since the beginning of January).
And like many users of Composer on Windows, I've got this error :
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl"
So I checked on the right php.ini page if it was unabled and it was!
I can't find any help since there are very few users of MAMP on Windows.
Thank you for your help or suggestions
Open php.ini located in your "\MAMP\conf\" folder or copy the php.ini into a \MAMP\bin\php\php[your PHP version number]\
Find "extension=php_openssl.dll"
;extension=php_openssl.dll - remove ";"
Restart your MAMP , extension should be loaded after that.
Had the same problem.
The solution is quite easy:
Ensure that extension=php_openssl.dll is uncommented (Remove ;) and copy the php.ini file at the same directory where the php.exe is located, because Composer searches there for an php.ini File and not in the MAMP conf folder.
Step 1: Go to following Folder
\MAMP\bin\php\php[your php version you are working on]
Note: to check version of php you are using go to Mamp prefrences and then click on php tab and there you can see Standard Version the version you are using.
mine was \MAMP\bin\php\php5.6.8
Step 2: Inside that folder find file named as
php.ini-production
Step 3: Open this file in Notepad to edit
Step 4: Search for by pressing ctrl+F
extension=php_openssl.dll
Step 5: Remove Semicolon(;) before it
Step 6: Restart MAMP and voila You are ready to install Composer.
This method works as of version 3.2.2:
Open php.ini located in your \MAMP\conf\ folder and copy the php.ini file into \MAMP\bin\php\php[your PHP version number]\ (You can find the version number you are using in MAMP's preferences)
Find extension=php_openssl.dll remove ; if it exists.
Open php.ini-production and php.ini-developmen that exist in the same folder that you copied the php.ini file into.
Find extension=php_openssl.dll remove ; if it exists.
Restart your MAMP, and the extension should be loaded after that and you should be able to install Composer.
I spent hours on this issue, followed the suggested answers and couldn't get it working.
So to anyone else getting a bunch of errors, remember MAMP is still in Beta for windows and some issues will run deeper than is practical to fix.
MAMP & MAMP PRO for Windows is available as a Beta version. It may still contain some. We do not recommend using MAMP & MAMP PRO Beta for Windows in a production environment.
In the end I had to switch to WAMP.
I spent quite a bit of time too. In my Windows 10 MAMP installation the openssl extension was enabled by default in all php.ini files. I got it working by adding the desired PHP version to the Windows system PATH before installing Composer. MAMP PRO has a setting 'PHP in system' path on the 'PHP' tab of control panel.
I was able to figure this out with MAMP PRO on Windows 7, and I assume MAMP would be the same.
The tricky step is you have to copy the php.ini file to your php.exe location in order to install composer. (MAMP PRO leaves these in separate locations)
For example I am using php 5.6.0, you can use any version just make the appropriate changes.
STEPS:
Path for php.exe C:\MAMP\bin\php\php5.6.0\php.exe
Path For php.ini C:\Users\Public\Documents\Appsolute\MAMPPRO\conf\php5.6.0.ini
Edit the php.ini from step 2 as necessary (uncomment openssl)
Copy the php5.6.0.ini from step 2 to the php.exe directory from step 1
Rename this copied php5.6.0.ini to just php.ini
Composer should then be able to install correctly.

composer not install in windows 7

I already uncommented in php.ini:
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
;extension=php_oci8_11g.dll
extension=php_openssl.dll
;extension=php_pdo_firebird.dll
Variables of the system set ok.
PHP version 5.4.16:
C:\wamp\bin\php\php5.4.16\php.exe
Add to System path variable:
C:\ProgramData\ComposerSetup\bin
But, recive this error:
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The openssl extension is missing, which means that secure HTTPS transfers are
impossible. If possible you should enable it or recompile php with --with-openssl
I'm using:
windows 7
Wamp
php 5.1.16
apache 2.4.4
How solve this problem, please help me.
Open php.ini located in your "php" folder for example in xampp the file is in XYZ:\xampp\php\
Find "extension=php_openssl.dll"
";extension=php_openssl.dll" - remove ";"
Restart your xampp (or whatever u use), extension should be loaded after that.
Try agien to install composer.
ensure you are editing the php.ini locate on same place where is located php.exe, i was the same problem and wamp say the openssl is actived but Composer-Setup.exe used the php.ini in php directory/ext/ and wamp used C:\System...\php.ini,
Regards,
I have battled this several times. And this is the best solution I have found.
As mentioned, you need to ensure that extension=php_openssl.dll is enabled but doing just that sometimes may not resolve the error.
You should check that you have PHP on your path variable then see what INI file is loaded by typing php --ini in the console it should give you something like:
Configuration File (php.ini) Path: C:\WINDOWS
Loaded Configuration File: C:\WINDOWS\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
Make sure you are enabling the settings in the correct ini file. If you dont have an ini file loaded put an ini file from the php directory into c:\windows.
Also important
I find it helps to change the extension_dir flag to an absolute path from relative to makesure the system can find php_opensll.dll.
To do this uncomment the line starting extension_dir and change it to match from the drive root.
Example: C:\php\ext instead of ext/
For MAMP users, this is what worked for me.
If your php.ini is located under a \MAMP\conf\
copy the php.ini into a\MAMP\bin\php\php[your PHP version number]\
Restart MAMP and the command-line window
Go to a directory under a command-line window where you want to install composer
run from a command line:
php -r "readfile('http://getcomposer.org/installer');" | php
NOTE: it is http not https !
END
I figured it out and successfully installed Composer in My windows 10 PC.
I am sharing two solutions here.
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 in c:\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 in c:\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 time these extensions are enabled but you can un-comment it in php.ini file for solving the issue).
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 your php.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.
Hope I can solve your issue .
That's all folks . Happy coding !!! (amitamie.com) :-) ;-)
The problem solved after turn off windows firewall.
installation complete!
I nearly wrapped my head off trying to install composer on my windows 7 machine.
I was trying to install composer through the composer installer from getcomposer.org.
After the common openssl extension enabling (As above answers describing).
The installer has finished the installation successfully. But calling composer on the command line, wasnt
possible. It was telling me composer / application not found, check for typos etc...
Cant getting it running, I looked at the manually install guide and noticed something weird.
The doc said: "Close your current terminal. Test usage with a new terminal:"
I closed my terminal window. Opened a new one and IT WORKED!!!
I had a terminal window open during the composer installation. After that I was trying to call composer via the command line in this terminal. This didnt work.
So why did it not work?
The composer installer downloads the composer.phar file and sets a environment path to it. The terminal only gets the environment PATHS, when it gets started. So of course the path wasnt set for the terminal.
Solution:
If you have a terminal open before the installation just close it and open a new terminal window to get composer ready to use!!!
I hope I can save someone a couple hours of living time.
You can follow this guide:
http://abuango.net/2014/08/16/how-to-install-composer-on-windows-with-xampp/
Hope it helps you.
Find a php.ini in C:\wamp\bin\php\php5.4.16\ (the configuration file of PHP).
Remove ; in lines ;extension=php_openssl.dll and ;extension_dir = "ext". PHP will know that you are using a php_openssl extension and extension_dir is the location of extensions (you can see it in the comment above php_openssl).
Run the Windows command prompt with administrator permissions.
Execute the following command: mklink C:\Windows\php.ini C:\wamp\bin\php\php5.4.16\php.ini
Composer search php.ini in C:\Windows\php.ini and you have your PHP in WAMP. With mklink command you create a link php.ini that aim to your WAMP's php.ini.
i was facing the same issue but i fixed that,
if you are using wamp
goto your selected php version directory and then you need to edit that directory php.ini file
replace this line ;extension=php_openssl.dll to extension=php_openssl.dll and save and then restart then it will be working :)
Beside all of the above If php/xampp is not installed in c drive this problem occurred (what happened with me).
In that case please follow this link :
http://abuango.net/2014/08/16/how-to-install-composer-on-windows-with-xampp/
I was facing the same issue in windows 7 PC with xampp.
Cannot open '\xampp\php\extras\browscap.ini' for reading in Unknown on line 0
I just change the value of 'browscap' in php.ini file. Use full path instead of absolute path.
In my case Xampp was in E drive so I have changed
browscap="\xampp\php\extras\browscap.ini"
to
browscap="E:\xampp\php\extras\browscap.ini"
And it works for me!

How to enable PHP's openssl extension to install Composer?

I am trying to install Laravel in WAMP setup. I am getting a warning message for not enabling openssl which I had already done in WAMP.
Here is a screenshot of the message.
It is possible that WAMP and Composer are using different PHP installations. Composer will use the PHP set in the PATH environment variable.
If you want to enable the openssl extension to install Composer, first you need to check the location of the PHP installation.
Open a Command Prompt, type: echo %PATH% then check for the location of your PHP installation.
Go to that location and edit the file named: php.ini.
Uncomment the line extension=php_openssl.dll by removing the semicolon at the beginning.
Now you are good to install Composer.
I solved my problem a different way. The problem is that wamp's GUI was misleading: it claimed that I had php_openssl enabled.. and if I clicked on php.ini on the same GUI.. it actually showed that extension=php_openssl.dll was uncommented..
I'm not sure if i'm using the same installer version of composer of the OP, but it actually asks you at the beginning to specify the php.exe that you like to apply composer on (which basically ensures that no one tries to apply composer to the wrong php executable as what happened with the OP)..
The way I solved this was by going myself into the installation of php within the wamp package: C:\wamp\bin\php\php5.4.12 and looking php.in there.. when I opened it I was shocked that the line extension=php_openssl.dll was actually commented! I uncommented it and it worked just fine.
I had the same problem and here the solution I found, on your php.ini you need to do some changes:
extension_dir = "ext"
extension = php_openssl.dll
Every one here talks active the openssl extension, but in windows you need to active the extension dir too.
For WAMP server, comment given by "Enrique" solved my problem.
wamp is using this php.ini:
c:\wamp\bin\apache\Apache2.4.4\bin\php.ini
But composer is using PHP from CLI, and hence it's reading this file:
c:\wamp\bin\php\php5.4.12\php.ini (so you need to enable openssl there)
For composer you will have to enable extension in
c:\wamp\bin\php\php5.4.12\php.ini
Change:
;extension=php_openssl.dll
to
extension=php_openssl.dll
If you're doing this on Windows without one of the WAMP stacks, here's how to get this going
Download an installation of PHP for Windows. Generally you'll want a non-thread safe install. You can use 32-bit or 64-bit builds
Extract the zip file somewhere. I would suggest C:\php. Composer's installer found it there without any additional prompting
The latest versions of PHP for Windows do not come with a php.ini by default. Instead, you'll see two files, as noted below. Rename one to php.ini or copy it into php.ini.
php.ini-development
php.ini-production
Open your php.ini file and remove the semicolon from this line (you might want to uncomment other things as well but this line is the only one necessary for Composer)
;extension=php_openssl.dll
That should be all you need to do. The Composer installer should do everything else you need from here.
You need to enable "extension=php_openssl.dll" in both files (php and apache). my pc files path are these :
C:\wamp\bin\php\php5.3.13\php.ini
C:\wamp\bin\apache\apache2.2.22\bin\php.ini
This is an old question but I just had the same issue (with PHP7) and the solution was, in the end, pretty simple. Uncommenting the line in php.ini as per the other answers wasn't quite enough though. I needed to change it from:
;extension=php_openssl.dll
to:
extension=ext/php_openssl.dll
Note the ext prefix. The dll already existed but was in a subfolder. After changing the config the composer installer was happy.
you need to enable the openssl extension in
C:\wamp\bin\php\php5.4.12\php.ini
that is the php configuration file that has it type has "configuration settings" with a driver-notepad like icon.
open it either with notepad or any editor,
search for openssl "your ctrl + F " would do.
there is a semi-colon before the openssl extension
;extension=php_openssl.dll
remove the semi-colon and you'll have
extension=php_openssl.dll
save the file and restart your WAMP server after that you're good to go.
re-install the application again that should work.
There are two php.ini files, one for development and one for production. Leave those, there is another php.ini file for configuration settings just above them with a gear like icon edit that.
After editting the "right" files (all php.ini's). i had still the issue.
My solution was:
Adding a System variable: OPENSSL_CONF
the value of OPENSSL_CONF should be the openssl.cnf file of your current php version.
for me it was:
C:\wamp\bin\php\php5.6.12\extras\ssl\openssl.cnf
-> Restart WAMP
-> should work now
Source: http://php.net/manual/en/openssl.installation.php
I faced the same problem, but when i was lokking for php.ini and php.exe i found php.exe at C:\UwAmp\bin\php\php-5.4.15 when php.ini at C:\UwAmp\bin\apache.
I just copy php.ini at C:\UwAmp\bin\php\php-5.4.15 and Uncomment the line extension=php_openssl.dll and it fixed.
I am using WAMP server.
Actually its files showed that openssl is opened.
But manually I went to the folder and edited php.ini.
Then I found it has not opened openssl.I uncommented it and it worked after after WAMP restart.
C:\wamp\bin\php\php5.3.13
Browse to the line that reads:
;extension=php_openssl.dll
and remove the semicolon preceding the line. Restart your WAMP server services (click in your icon tray > 'Restart All Services'
If you still cannot solve your problem have a look at this. This might be the solution you are looking for
There are several php.ini files in C:\wamp\bin\php\php x-y-z folder. You may find production, development and some other php.ini files. No point of editing production and development files. Find the file which is exactly as same as the below image. (You can find it. Just type php.ini in your search bar and do a search). Open the file and remove ; from extension=php_openssl.dll. Save the file and close it. Restart all services in Wampp server. Re-install your composer.
That is it.
Wamp works with another php.ini that is in C:\wamp\bin\apache\Apache2.4.4\bin\php.ini. So you need to manualy find the correct file, that is in C:\wamp\bin\php\php5.4.12\php.ini. Uncomment the extension=php_openssl.dll line and just try to install Composer again.
For those who're having the same problem as I was. After doing all the solutions above, still didn't work for me. I found out that, uWamp was creating the PHP.INI file in bin/apache directory. So I had to copy the PHP.INI file into php installation directory, that is, bin/php/phpXXXX directory. This should also be where the php.exe is that you selected from the composer setup.
Hope this helps.
If you compiled from source, then adding extension=php_openssl.dll to the php.ini file may not work.
To troubleshoot this, open a command prompt and type php -i. Scroll up to the first line, it will tell you the most recent error regarding your php.ini file.
To solve the issue, find the php_openssl.dll file, for me it was in the very same directory of the compilation output:
C:\php-sdk\bin\phpdev\vc14\x64\php-7.0.13-src\x64\Release_TS
So just add the directory where the extension is, to the php.ini:
extension_dir = "C:\php-sdk\bin\phpdev\vc14\x64\php-7.0.13-src\x64\Release_TS"
Hopefully the error will be gone
If you are using xampp .Go back to where you choose which command-line php you want to use at the beginning of your installation and select the path where your xampp folder is included.After that if your installer says youve got duplicate 'extension=php_openssl.dll' comment one ssl file in your php ini with a ';'and your installation should run smoothly.

Categories