I already uncommented in php.ini:
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
;extension=php_oci8_11g.dll
extension=php_openssl.dll
;e
For MAMP users, this is what worked for me.
If your php.ini is located under a \MAMP\conf\
NOTE: it is http not https !
END
The problem solved after turn off windows firewall.
installation complete!
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/
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.
php.ini in C:\wamp\bin\php\php5.4.16\ (the configuration file of PHP).; 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).mklink C:\Windows\php.ini C:\wamp\bin\php\php5.4.16\php.iniComposer 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 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/