Home  >  Q&A  >  body text

SSL/TLS protection requires openssl extension

<p><pre class="brush:php;toolbar:false;">composer create-project flarum/flarum . --stability=beta</pre> <p>I tried running this command but it gave me this error. </p> <pre class="brush:php;toolbar:false;">[RuntimeException] The openssl extension is required for SSL/TLS protection but is not available 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.</pre> <p>I tried adding "extension=php_openssl.dll" to "php.ini" but I still get this error</p>
P粉330232096P粉330232096444 days ago567

reply all(2)I'll reply

  • P粉462328904

    P粉4623289042023-08-24 15:10:46

    This problem is caused by openssl and extension directories, so please uncomment the following extensions in the php.ini

    file

    extension=php_openssl.dll

    extension_dir = "ext"

    It works on my machine.

    reply
    0
  • P粉237125700

    P粉2371257002023-08-24 13:38:06

    I also encountered the same error. I fixed the issue by turning off TLS for Composer, which wasn't secure, but I took the risk on my development machine.

    Try this:

    composer config -g -- disable-tls true

    And re-run your Composer. This works for me!

    But it is not secure and is not recommended for use with your server . The official website says:

    If you don't want to enable the insecure layer in your computer/server, then set up your php to enable openssl and it will work too . Make sure you have the PHP Openssl extension installed and enabled in the php.ini file.


    To enable OpenSSL, add or find and uncomment this line in the php.ini file:

    Linux/OSx:

    extension=php_openssl.so

    Windows:

    extension=php_openssl.dll

    Reload your php-fpm/web server if necessary!

    renew:

    Starting with PHP 7.4, the extension is extension=openssl (known in Windows).

    reply
    0
  • Cancelreply