Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php composer.phar update does not work with Symfony install

I'm running WAMP on Windows 7 64 Bits. The PATH variable is set to c:\wamp\bin\php\php5.3.13\

 

I'm trying to install Symfony and I do not understand why first line runs and not the second:

This runs successfully:

php c:\wamp\bin\php\php5.3.13\composer.phar update

 
This line fails:

php composer.phar update

With the error:

"Could not open input file: composer.phar"

What can explain this?

 
get_include_path returns : `

.;C:\wamp\bin\php\php5.3.13\php\PEAR`.


Does this mean that if composer.phar is not in PEAR directory 'php composer.phar update' will not work?

like image 641
Manu Avatar asked Sep 10 '12 16:09

Manu


4 Answers

Command composer self-update will do the trick.
For example:

  1. goto cmd and jump into your project folder if in case
    c:\wamp\www\{yourprojectfolder}
    as your project

  2. Run this
    cd c:\wamp\www\{yourprojectfolder}

  3. Use this
    composer self-update
like image 76
INDIAN2020 Avatar answered Nov 13 '22 19:11

INDIAN2020


You should try this instead:

composer.phar update

Why would php be aware of your $PATH variable?

Plus, I think $PATH is only used by your shell when dealing with the first word of your command line.

like image 43
greg0ire Avatar answered Nov 13 '22 18:11

greg0ire


You should logout and then login or restart in order to changes in path becomes available.

like image 26
Ivaylo Alexandrov Avatar answered Nov 13 '22 20:11

Ivaylo Alexandrov


Okay this is how i solved it.

  1. Download and install git bash
  2. open git bash
  3. run composer selfupdate or composer self-update

cheers hope this helps you too.

like image 30
Junior_swashluv Avatar answered Nov 13 '22 18:11

Junior_swashluv