Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

You must enable the openssl extension to download files via https

People also ask

How do you fix the openssl extension is required for SSL tls protection but is not available?

[RuntimeException] The openssl extension is required for SSL/TLS protection but is not availab le. If you can not enable the openssl extension, you can disable this error , at your own risk, by setting the 'disable-tls' option to true.


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.


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


make sure you have correct path to extension folder

extension_dir = "ext"

by default it is commented with ; character


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

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!