0

I'm trying to install Composer for on my Window 7 OS but its giving me following error:

Connection Error [ERR_CONNECTION]: Unable to connect to getcomposer.org
Request to https://getcomposer.org/installer failed with errors:
Failed to open stream: No connection could be made because the target machine actively refused it.

My PHP Configuration is :

PHP Version 5.5.22

Apache 2.2.13

What could be the issue?

J.K.A.
  • 7,272
  • 25
  • 94
  • 163
  • I think there will be issue with secure http connection. Follow steps [here](http://www.naeemrana.com/technology/how-to-install-composer-dependency-manager-for-php-in-windows/) . You can replace URL `https://getcomposer.org/installer` with `https://getcomposer.org/installer`.(`s` removed) – Firoz Sabaliya Apr 10 '15 at 04:57
  • @Firoz : I already tried that but still its not working. Both from command line and through .exe – J.K.A. Apr 10 '15 at 05:02
  • Have you tried exact steps from this URL: `http://www.naeemrana.com/technology/how-to-install-composer-dependency-manager-for-php-in-windows/`. ? if yes then which step you are getting error? – Firoz Sabaliya Apr 10 '15 at 05:11
  • Yes I tried exact steps. Error is coming when I'm trying to fire this command `php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"` – J.K.A. Apr 10 '15 at 05:13
  • May be your IP is blocked by getcomposer.org. Can you hit this URL `https://getcomposer.org/installer` in browser? any output you are getting? – Firoz Sabaliya Apr 10 '15 at 05:13
  • nope. its showing php code as it is – J.K.A. Apr 10 '15 at 05:15
  • Can you try this one `php -r "eval('?>'.file_get_contents('http://getcomposer.org/installer'));" ` – Firoz Sabaliya Apr 10 '15 at 05:17
  • This may help you `http://stackoverflow.com/questions/22545257/composer-install-for-windows` and `https://getcomposer.org/doc/articles/troubleshooting.md#general` – Firoz Sabaliya Apr 10 '15 at 05:26
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/74895/discussion-between-firoz-and-sky). – Firoz Sabaliya Apr 10 '15 at 05:55

1 Answers1

-1

Try this C:\bin>php -r "readfile('https://getcomposer.org/installer');" | php