SSL/TLS protection requires openssl extension
P粉330232096
2023-08-23 21:57:58
<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>
This problem is caused by openssl and extension directories, so please uncomment the following extensions
filein the
php.iniextension=php_openssl.dll
extension_dir = "ext"
It works on my machine.
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:
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:
Windows:
Reload your php-fpm/web server if necessary!
renew:
Starting with PHP 7.4, the extension is
extension=openssl
(known in Windows).