php composer.phar update does not work with Symfony install

戏子无情 提交于 2019-12-01 14:58:57

问题


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?


回答1:


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.




回答2:


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



回答3:


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




回答4:


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.



来源:https://stackoverflow.com/questions/12355540/php-composer-phar-update-does-not-work-with-symfony-install

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!