php composer doesn't work. composer does. Why?

I'm working through a tutorial that has me entering in a command into the Git Bash interface that looks like this:

php composer.phar require coolcsn/csn-user:dev-master

When I do that, I get an error message that says "Could not open input file: composer.phar"

I can do what needs to be done by entering the same command like this:

composer.phar require coolcsn/csn-user:dev-master

But I want to understand why the first command doesn't work and, if the fact that it doesn't work, represent something I need to change on my system.

What do you think?
Bruce GustPHP DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Loganathan NatarajanLAMP DeveloperCommented:
Are you using Windows? You need to install Composer

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bruce GustPHP DeveloperAuthor Commented:
Hey, Logonathan!

I have installed composer and I am using Windows. When I run "composer" on Git Bash, I get a screen that outlines all of the specifics relative to that application. So, I'm confident I do have the app, I just can't seem to fire anything pertaining to composer when I've got "php" prefacing the command.

Make sense?
When you execute:
php --version

do you see the error as well?  If so, you need to add php to your environment's PATH variable.
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Bruce GustPHP DeveloperAuthor Commented:
hielo, when I execute that command I don't get the error,just a a collection of text that has my PHP version number etc.
Ray PaseurCommented:
This is no an answer, just a recommendation.  Get off Windows.  Go get a Mac.  You can thank me later.  I've been down this path before, and I found Windows to be the biggest impediment I could imagine.  Like you I had become comfortable with Windows, so I didn't know what I was missing.  I promise that in a few months of working with a Mac and using the command line, you will never want to go back to Windows for anything.  Plus, most of our colleagues who have advanced beyond the "beginner" level of web development are using Macs, so it will be easier to get help when you speak the same language!
Dave BaldwinFixer of ProblemsCommented:
I have to disagree with Ray on this.  Get a Linux machine, maybe, but a Mac?  Mac's OSX tries to hide too many things from the user.  Yes, I have two Macs, 4 Linux machines, 15 or 20 Windows machines.  Besides, there are more tools available under Windows than any other system.

On the other hand... I have successfully avoided using composer so far.  It appears to require being used on the 'target' machine.  But I would never do 'development' on the production system which is what composer seems to want.
Bruce GustPHP DeveloperAuthor Commented:
I got it figured out, fellas. Thanks for your input.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.