Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composer Install for Windows-

So I am trying to install Composer and setup Laravel on my Windows OS how ever I keep getting the same error when I run the install.

To start I selected php.exe as it asks from directory C:\wamp\bin\php\php5.4.16

I click next, then install and it will go through like its install then stop and display the error:

An error occurred. Clicking Retry may resolve this issue.
Connection error [ERR_CONNECTION]:Unable to connect to getcomposer.org

Request to http://getcomposer.org/installer failed with errors:
Failed to open stream: A connection attempt failed because the connected party 
did not properly respond after a period of time, or established connection failed 
because connection host has failed to respond.

Now I'm not sure if I have to sets something up or change something in the php.ini file to make this take place but from what I can tell the site getcomposer.org is unable to communicate with my PC as if I have a firewall up blocking it which my firewall is turned off at the time of installation.

I was unable to find a matching question on stack overflow or in any online search, so I went ahead and thought I'd ask to see if anyone can help out, thank you.

like image 751
Warlo Avatar asked May 25 '26 18:05

Warlo


2 Answers

The PHP CLI ( Command Line Interface i.e running php from the command line ) uses a different php.ini to the one used by PHP under apache.

Edit the php.ini file that is on your C:\wamp\bin\php\php5.4.16 and make sure you have the extension php_openssl and 'php_curl` enabled.

like image 72
RiggsFolly Avatar answered May 28 '26 08:05

RiggsFolly


You can try in a console if pinging the composer.org website works, like so... ping composer.org, if that does not work that explains why the install fails.

like image 36
Bielco Avatar answered May 28 '26 07:05

Bielco



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!