简体   繁体   中英

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.

The PHP CLI ( Command Line Interface ie 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.

你可以尝试在控制台中pinging composer.org网站,如此... ping composer.org ,如果这不起作用,解释了安装失败的原因。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM