tenki tenki - 1 month ago 23
PHP Question

The openssl extension is required for SSL/TLS protection

composer create-project flarum/flarum . --stability=beta


I try to run this command, but it gave me this error.

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


I tried to add "extension=php_openssl.dll" to "php.ini", but it still got this error

Answer

The same error ocurred to me, i'm fixed it turning off tls for composer, it's not safe but I assuming risk on my develop machine.

try this:

composer config -g -- disable-tls true

and re-run your composer. Works to me!

But this is a unsecure and not recomended for your Server and the oficial website says:

If set to true all HTTPS URLs will be tried with HTTP instead and no network level encryption is performed. Enabling this is a security risk and is NOT recommended. The better way is to enable the php_openssl extension in php.ini.

If you don't want enable unsecure layer in your machine/server, then setup your php to enable openssl and also works.

Comments