Saturday 9 April 2016

Composer | Windows | PHP Error : "You must enable the openssl extension to download files via https"

PHP - Composer - Windows


Okay, you are trying to install composer, and encountered the above error. This error occurred, if your php_openssl.dll is missing or commented in your php.ini.




Steps to resolve:

1. Download php.zip from here (64 bit version). (Other version can be found here: PHP for Windows)

2. Unzip it and copy all the contents inside of uncompressed folder in to the C:\Program Files\php directory. (Create php directory)

3. Add C:\Program Files\php in your environment PATH variable.

4. Download composer and try to install it.

5. If you get the above error, copy the php.ini-development file present in C:\Program Files\php, and rename it to php.ini file.

6. Open the php.ini file.

7.  Find the ";extension=php_openssl.dll " then change it to "ext/php_openssl.dll" (removed semi-colon and added ext)

and continue with the installation of composer. It will install successfully.

No comments:

Post a Comment