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?
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.
Command composer self-update
will do the trick.
For example:
goto cmd and jump into your project folder if in case
c:\wamp\www\{yourprojectfolder}
as your projectRun this
cd c:\wamp\www\{yourprojectfolder}
- Use this
composer self-update
You should logout and then login or restart in order to changes in path becomes available.
Okay this is how i solved it.
- Download and install git bash
- open git bash
- run composer selfupdate or composer self-update
cheers hope this helps you too.
来源:https://stackoverflow.com/questions/12355540/php-composer-phar-update-does-not-work-with-symfony-install