Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

467
Views
Composer error Could not open input file: composer

I'm having a problem with Composer. I have Composer installed globally on my machine. I am trying to install intercom using composer. I tried the command:

php composer.phar require intercom/intercom-php

but that returned "Could not open input file: composer.phar"

After investigating and reading the issues others have had I then tried

php composer require intercom/intercom-php

but that returned "Could not open input file: composer"

As I stated, I have Composer installed globally on my machine. I can type in the command "composer update" and it works from any directory.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

If you got composer installed globally and composer update just works then get rid of php and instead of

php composer require intercom/intercom-php

just do

composer require intercom/intercom-php

The reason why former form does not work while the latter does is that you are invoking php executable and pass composer as its argument. It is then treated by php binary as script file path and as there's neither relative nor absolute path segments used, just file name, then file composer is expected to exist in current working directory which is no the case. In second invocation, your shell will look for composer binary in all known paths defined in $PATH env variable.

If you wonder where composer executable realy lives, you can use

which composer

Or on Windows

where composer 
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!