Composer Requires OpenSSL Extension for SSL/TLS Protection: Troubleshooting
When using the Composer create-project command to initialize a Flarum project, you may encounter the following error message:
[RuntimeException] The openssl extension is required for SSL/TLS protection but is not available. 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.
This error indicates that Composer requires the openssl extension to establish SSL/TLS connections for secure communication. To resolve this issue, you have two options:
Option 1: Enable the OpenSSL Extension
Option 2: Disable TLS for Composer (Not Recommended)
Warning: This option is not recommended for production environments due to security risks.
Run the following command to disable TLS for Composer:
composer config -g --disable-tls true
Additional Note:
As of PHP 7.4, the extension name has been simplified to extension=openssl for Windows.
The above is the detailed content of Why is Composer Requiring the OpenSSL Extension for SSL/TLS Protection?. For more information, please follow other related articles on the PHP Chinese website!