I'm trying to install laravel on windows 10. I installed composer to install laravel but it gives me below error.
[Composer\Exception\NoSslException] 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.
Command doesn't matteri it gives above error with all commands...
I checked out this question and used solutions but it didin't work for me..
I tried these solutions
composer config -g -- disable-tls true
extension=php_openssl.dll // open openssl extension in php.ini file. - I restarted apache after that but nothing changed
To solve the Memory exhausted issue, you can try running composer with an Unlimited memory flag like this: php -d memory_limit=-1 /usr/local/bin/composer [COMMAND] or php -d memory_limit=-1 composer. phar [COMMAND] when using a local composer. If that doesn't help, you can upgrade your hosting plan.
I had the same issue. I did the following things to make sure the composer works out.
php --ini
sample output before correction:
Configuration File (php.ini) Path: C:\WINDOWS
Loaded Configuration File: (none)
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
This C:\WINDOWS here is a hoax. When I looked in the php installation directory, I found out there is NO php.ini. There are two files php.ini-development
and php.ini-production
. Just rename one to php.ini
Then you should see the correct ini path when you do php --ini
Afterwards, open the php.ini file and uncomment the following line
;extension_dir = "ext"
should be
extension_dir = "ext"
Then uncomment the extensions the same way. The following are usually required. (But please find out what you need from the messages you see from composer commands)
extension=fileinfo
extension=gd2
extension=mbstring
extension=openssl
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With