General Laravel

composer the openssl extension is required for ssl/tls protection mamp

composer the openssl extension is required for ssl/tls protection mamp

I have tried to instal laravel 5.5 in my windows sytem at MAMP. When I run Laravel global command “composer global require “laravel/installer”” I have faced the error like below.

[Composer\Exception\NoSslException]
composer the openssl extension is required for ssl/tls protection but it is not available. If you cannot enable the openssl extension. you can disable this error, at you own risk, by setting the ‘disable-tls’ option to true.

I have finally realised there is no Openssl enabled in my system.

I have checked my phpinfo(), But it says openssl was enabled here. I just confused and checked my PHP.ini file @C:\MAMP\conf\php7.0.13

 

After few research I have found there are 2 php.ini files in your MAMP settings.



You can find another php.ini file @C:\MAMP\bin\php\php7.0.13

There you can see 2 files

How to fix it :

Finally everything becomes normal and you can start to install laravel.

If nothing works above just run the below command to disable SSL security. The everything will work as expected.

May you will face ext-mbstring extension missing error next step. To fix this just enable ext-mbstring.dll in you php.ini file.

Hope it will help someone.
Thanks!.