You must enable the openssl extension to download files via https
Solution 1
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
Verify you are editing the correct php.ini file.
Reference: https://github.com/composer/composer/issues/1440
"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
make sure you have correct path to extension folder
extension_dir = "ext"
by default it is commented with ; character
Solution 4
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
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
or
$ composer selfupdate
Good luck!
Uttam Dutta
Updated on May 16, 2020Comments
-
Uttam Dutta almost 4 years
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?
-
Diego Favero over 10 yearsI also had to enable the phar extension ( extension=php_phar.dll ) and as said below, the apache ssl module !
-
George D. over 10 years"PHP CLI SAPI is using different php.ini than CGI or Apache module." That was the trick!
-
Ruwantha over 10 yearswho would thought that... Really... This solved the problem. Thanks
-
totymedli over 10 yearsIf you can't find that line in your
php.ini
just simply add the lineextension=php_openssl.dll
under the Dynamic Extensions part in it. -
Shashikumar Misal almost 10 yearsI am Using xampp, Composer giving the same open ssl missing error even after removing the ';' of openssl extension in php.ini.
-
Prabowo Murti over 9 yearsIf you are using Mac and
port
, you can select the PHP version byport select php php55
and install the extensionport install php55-openssl
-
im_brian_d over 9 yearsthis line was commented out completely and now it works
-
ThaDafinser about 9 yearsThis is wrong. Check with phpinfo() which php.ini is used
-
haakym about 8 yearsimportant for windows installation!
-
MyDaftQuestions about 8 yearsWhere is this line? In which file? the php.ini in 1, C:\wamp64\bin\apache OR 2. C:\wamp64\bin\php\php7.0.0 ?
-
Abhijit Kumbhar over 7 yearshow to edit this settings in shared hosting like godaddy
-
BorisS over 7 yearsTry creating php.ini in your root folder as described here: stackoverflow.com/questions/16140917/…