You must enable the openssl extension to download files via https

PhpSslOpensslZend Framework2Composer Php

Php Problem Overview

I wanted to install Zend Framework 2. So I downloaded the skeleton application. As mentioned in the ZF2 manual, we have to issue the command

php composer.phar install 

Inside the skeleton.

But I'm getting an error > You must enable the openssl extension to download files via https

Then I enabled the ssl_module in my wamp, I checked the php_ini file and I can see the following line

> extension=php_openssl.dll

Still I'm getting the same error. Anybody having any clue what I missed out?

Php Solutions

Solution 1 - Php

PHP CLI SAPI is using different php.ini than CGI or Apache module.

Find line ;extension=php_openssl.dll in wamp/bin/php/php#.#.##/php.ini and uncomment it by removing the semicolon (;) from the beginning of the line.

Solution 2 - Php

Verify you are editing the correct php.ini file.


"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-X.Y.Z\php.ini to enable it for the CLI."

Solution 3 - Php

make sure you have correct path to extension folder

> extension_dir = "ext"

by default it is commented with ; character

Solution 4 - Php

I also had the same issue while playing around Zend Framework 2 and composer. I'm using PHP 5.4 (installed via macports) and my solution was to install openssl for PHP 5.4 via macports as well.

sudo port install php54-openssl

Solution 5 - Php

I have faced this problem, but configuging openssl (also for cli) did not help.

I have updated composer and this sloved my problem.

Just type:

$ php composer.phar self-update


$ composer selfupdate

Good luck!

Solution 6 - Php

I use XAMPP. In C:\xampp\php\php.ini, the entry for openssl did not exist, so I added "extension=php_openssl.dll" on line 989, and composer worked.

Solution 7 - Php

You need to enable "extension=php_openssl.dll" in both files (php and apache). my pc files path are these :

  1. C:\wamp\bin\php\php5.3.13\php.ini

  2. C:\wamp\bin\apache\apache2.2.22\bin\php.ini

Solution 8 - Php

Uttam, if your issue is not solved then try the follwoing 3 step approach. It worked for me as I had exactly same issue.

step1: click on wamp tray icon.

step2: goto menu apache->apache modules

step3: click on menu item "ssl_module"

it will automatically restart wamp. if wamp not restarted automatically then restart it through wamp tray menu-> Restart All services. After restart confirm that "ssl_module" coming as ticked under menu apache->apache modules

after that just attempt the php composer.phar install from going through the response shared by you, php.ini file contains extension=php_openssl.dll and the php/ext directory also have file "php_openssl.dll"

good luck

Solution 9 - Php

The Valery's answer helped me:

> 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.

Solution 10 - Php

Make sure that you update your php.ini for CLI. For my case this was C:\wamp\bin\php\php5.4.3\php.ini and uncomment extension=php_openssl.dll line.

Solution 11 - Php

Late answer but adding so other can learn the reason.

You also need to edit the php.ini file in the "wamp\bin\php\php-X.Y.Z" location.

Solution 12 - Php

I had to uncomment extension=openssl in php.ini file for everything to work!

Solution 13 - Php

Becareful if you are using wamp don't use the wamp ui to enable the extension=php_openssl.dll

just go to your php directory , for example : C:\wamp\bin\php\php5.4.12 and edit the php.ini and uncomment the extension=php_openssl.dll.

it should work.


All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionUttam DuttaView Question on Stackoverflow
Solution 1 - PhpBorisSView Answer on Stackoverflow
Solution 2 - PhpDurambaView Answer on Stackoverflow
Solution 3 - PhpAdam KopcińskiView Answer on Stackoverflow
Solution 4 - PhpFreddy DuarteView Answer on Stackoverflow
Solution 5 - PhpAthlanView Answer on Stackoverflow
Solution 6 - PhpAndrew KoperView Answer on Stackoverflow
Solution 7 - PhpMohammed Saqib RajputView Answer on Stackoverflow
Solution 8 - PhpadangView Answer on Stackoverflow
Solution 9 - PhpkarlisupView Answer on Stackoverflow
Solution 10 - PhpcodarriorView Answer on Stackoverflow
Solution 11 - PhpShah AlomView Answer on Stackoverflow
Solution 12 - PhptensorView Answer on Stackoverflow
Solution 13 - PhpmetiView Answer on Stackoverflow