Could not open input file: composer.phar

Sundar picture Sundar · Dec 25, 2013 · Viewed 180.2k times · Source

I am trying to install zendframework using composer tool in wamp server.

The following steps are done towards installation

  1. I downloaded the Composer-Setup.exe file from composer page and got successfully installed.

  2. I downloaded the zendframework and extracted inside the c:\wamp\www\zend folder

  3. I executed the command for self update

    php composer.phar self-update

This line generates the error message: could not open file composer.phar

how to resolve this error

If I try the

composer.phar self-update

enter image description here

Answer

Kamesh Jungi picture Kamesh Jungi · Jan 6, 2016

Use this :

php -r "readfile('https://getcomposer.org/installer');" | php

This will install composer to the current directory so that you can use php composer.phar