composer not install in windows 7 composer not install in windows 7 windows windows

composer not install in windows 7


  1. Open php.ini located in your "php" folder for example in xampp the file is in XYZ:\xampp\php\

  2. Find "extension=php_openssl.dll"

  3. ";extension=php_openssl.dll" - remove ";"

  4. Restart your xampp (or whatever u use), extension should be loaded after that.

  5. Try agien to install composer.


ensure you are editing the php.ini locate on same place where is located php.exe, i was the same problem and wamp say the openssl is actived but Composer-Setup.exe used the php.ini in php directory/ext/ and wamp used C:\System...\php.ini,

Regards,


I have battled this several times. And this is the best solution I have found.

As mentioned, you need to ensure that extension=php_openssl.dll is enabled but doing just that sometimes may not resolve the error.

You should check that you have PHP on your path variable then see what INI file is loaded by typing php --ini in the console it should give you something like:

Configuration File (php.ini) Path: C:\WINDOWSLoaded Configuration File:         C:\WINDOWS\php.iniScan for additional .ini files in: (none)Additional .ini files parsed:      (none)

Make sure you are enabling the settings in the correct ini file. If you dont have an ini file loaded put an ini file from the php directory into c:\windows.

Also importantI find it helps to change the extension_dir flag to an absolute path from relative to makesure the system can find php_opensll.dll.

To do this uncomment the line starting extension_dir and change it to match from the drive root.

Example: C:\php\ext instead of ext/