Tuesday, 23 September 2014

Installing Composer (Dependency/Package Manager) on XAMPP (LAMP Stack) Windows 7

Download the Composer setup Composer-Setup.exe

Run it.

Give it the location of the php executable i.e php.exe, im my case it was at c:\xampp\php\php.exe (XAMPP was installed at default location i.e. c:\xampp\)



If you get the Composer Error [ERR_DOWNLOAD]: Composer was not downloaded error,




here's what I did to resolve it:

Open up the Control Panel and go to:

Control Panel\System and Security\System



(or click the Win+Pause key to invoke it)

Goto Advanced system settings



that will open up System Properties



Click on Environment Variables button



Select the 'PATH' and click Edit



Add the line below to the end of what's contained in Variable value (if you just copy paste it then it will replace the values already present there, so be careful!)

;c:\xampp\php\;C:\ProgramData\Composer\bin

Click Ok, Ok, Ok

Open up c:\xampp\php in Windows Explorer (NOT Internet Explorer! Windows Explorer is the file manager of Windows OS) and open up php.ini in Notepad (I'm using SynWrite)



Next, find the Dynamic Extensions section:



Add this line to the end:

extension=php_openssl.dll



Save and Exit.

Go back to the Composer-Setup.exe and click Retry (Run it gain if you have closed it, give it the location of php.exe as described above and finish the setup, it should 'complete' happily now :) Well, mine did!



Log Out and Log In again to make it work.

Testing from the Command Prompt (just type composer from any directory):



Yay! Peace.

Now, back to Laravel.

No comments:

Post a Comment