Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not open input file: composer.phar

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

like image 635
Sundar Avatar asked Dec 25 '13 06:12

Sundar


People also ask

How do I get a composer phar file?

To install Composer locally, run the installer in your project directory. See the Download page for instructions. The installer will check a few PHP settings and then download composer.phar to your working directory. This file is the Composer binary.

What is PHP composer phar update?

php composer.phar update. This will resolve all dependencies of the project and write the exact versions into composer. lock . If you only want to update a few packages and not all, you can list them as such: php composer.phar update vendor/package vendor/package2.


Video Answer


1 Answers

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

like image 174
Kamesh Jungi Avatar answered Sep 25 '22 13:09

Kamesh Jungi