Composer is not recognized as an internal or external command, operable program or batch file.

Я установил Composer и выбрал там php из OpenServer. При вызове команды composer, composer -v выдает ошибку '""' is not recognized as an internal or external command,
operable program or batch file.. Команда php-v работает, а вот компот нет.

Show

Использую Windows 10
Кто сталкивался с такой проблемой ? Как решить ее ?

Спасибо!

  • Вопрос задан более трёх лет назад
  • 16204 просмотра

Комментировать

Решения вопроса 2

Подними путь в PATH к composer выше чем путь в PHP.

Composer is not recognized as an internal or external command, operable program or batch file.

У вас нет в PATH композера просто. Либо надо положить его туда, где производится поиск исполнимых файлов, либо прописать путь до него в PATH, либо запускать с полным путём. Ну и у вас должен быть composer.bat который собственно и будет запускать composer, конечно.

Прочитайте на всякий случай документацию по установке: https://getcomposer.org/doc/00-intro.md#installati...

Комментировать

Пригласить эксперта

Ответы на вопрос 1

Composer is not recognized as an internal or external command, operable program or batch file.

Валерий

@it_monk

Разработчик в oncloud.ru

Так может php composer.phar

Похожие вопросы
  • Показать ещё Загружается…

05 авг. 2022, в 02:48

20000 руб./за проект

05 авг. 2022, в 00:34

5000 руб./за проект

04 авг. 2022, в 22:08

500 руб./за проект

Минуточку внимания

composer is not recognized as an internal or external command in windows server

Questions : composer is not recognized as an internal or external command in windows server

2022-08-02T00:11:31+00:00 2022-08-02T00:11:31+00:00

628

I am using windows server 2008 os. i anycodings_composer-php download composer setup.exe and install to anycodings_composer-php my PC . when I try composer install . I anycodings_composer-php getting an error:

'composer' is not recognized as an internal anycodings_composer-php or external command,

eg:-

c:\xampp\htdocs\shop>composer install 'composer' is not recognized as an internal or external command, operable program or batch file.

My environment variable PATH is shown below:

C:\xampp\php\;C:\Users\Administrator\AppData\Roaming\Composer\vendor\bin

Total Answers 12

26

Answers 1 : of composer is not recognized as an internal or external command in windows server

For anyone coming here from Google who anycodings_php are facing the same issue. I just anycodings_php managed to solve this issue after all anycodings_php the other "solutions" other people anycodings_php suggested didn't work.

I installed Composer properly and the anycodings_php Environment variable was set but it just anycodings_php wouldn't work.

In my case composer is installed in anycodings_php C:\ProgramData\ComposerSetup\bin and anycodings_php this is exactly what is in my PATH anycodings_php Environment variable. After messing anycodings_php around a bit trying to fix it I saw that anycodings_php under System variables under PATH there anycodings_php is something called PATHEXT I opened anycodings_php that and added ;.PHAR to the end of it. anycodings_php So it ended up like this:

And this is what my PATH is now:

I closed all file explorer windows and anycodings_php command prompts and started a new CMD anycodings_php and ran composer --version and it anycodings_php worked!

I hope this helps someone facing the anycodings_php same issue as me.

0

2022-08-02T00:11:31+00:00 2022-08-02T00:11:31+00:00Answer Link

mRahman

2

Answers 2 : of composer is not recognized as an internal or external command in windows server

I had the same problem, I kept repeating anycodings_php the composer installation until it was anycodings_php resolved this way:

1) Download the composer installer anycodings_php (.exe) and put it on C:/XAMPP.

2) Run the installer by just clicking anycodings_php next till the end.

3) Open command-line (cmd) and cd to anycodings_php your project directory anycodings_php (C:/XAMPP/htdocs/myproject) and type anycodings_php composer and see if you have it anycodings_php installed.

4) It should work now, let's say you anycodings_php want to install a PHP framework from anycodings_php your project directory: cmd=>composer anycodings_php require slim/slim "^3.0".

0

2022-08-02T00:11:31+00:00 2022-08-02T00:11:31+00:00Answer Link

joy

4

Answers 3 : of composer is not recognized as an internal or external command in windows server

https://getcomposer.org/doc/00-intro.md#installation-windows

Close your current terminal and open a anycodings_php new one.

0

2022-08-02T00:11:31+00:00 2022-08-02T00:11:31+00:00Answer Link

jidam

5

Answers 4 : of composer is not recognized as an internal or external command in windows server

I had the same problem . In my case i anycodings_php used the command "php composer.phar " anycodings_php instead of "Composer " and it worked .

0

2022-08-02T00:11:31+00:00 2022-08-02T00:11:31+00:00Answer Link

miraj

1

Answers 5 : of composer is not recognized as an internal or external command in windows server

just paste " echo @php anycodings_php "%~dp0composer.phar" %*>composer.bat anycodings_php " This in your Terminal where you anycodings_php install composer and Boom you get the anycodings_php solution.

0

2022-08-02T00:11:31+00:00 2022-08-02T00:11:31+00:00Answer Link

miraj

5

Answers 6 : of composer is not recognized as an internal or external command in windows server

The solution is to use complete composer anycodings_php path instead of composer install eg:- anycodings_php C:\ProgramData\ComposerSetup\bin\composer anycodings_php install" instead of "composer install

Better still, add anycodings_php "C:\ProgramData\ComposerSetup\bin\" to anycodings_php your environment variables, so that you anycodings_php can use "composer install".

0

2022-08-02T00:11:31+00:00 2022-08-02T00:11:31+00:00Answer Link

miraj

1

Answers 7 : of composer is not recognized as an internal or external command in windows server

If u can't find composer file than follow only 2 steps 1- Download composer file from [https://getcomposer.org/download/]<click on Composer-Setup.exe> 2- Install above file at your project root dir. and give second path is your php.exe file and finally solve this issue.

0

2022-08-02T00:11:31+00:00 2022-08-02T00:11:31+00:00Answer Link

joy

6

Answers 8 : of composer is not recognized as an internal or external command in windows server

Simply use like this

C:\jay\xampp\htdocs\zoho1>php anycodings_php composer.phar require zohocrm/php-sdk

0

2022-08-02T00:11:31+00:00 2022-08-02T00:11:31+00:00Answer Link

jidam

1

Answers 9 : of composer is not recognized as an internal or external command in windows server

You Just Don't need to worry about this anycodings_php if you have installed composer using anycodings_php Command-line installation than this anycodings_php problem will occurs.

So my suggestion is to download .exe anycodings_php file by visiting this link anycodings_php https://getcomposer.org/

And also after download using this link anycodings_php you don't need to use php composer.phar anycodings_php instead of composer only

0

2022-08-02T00:11:31+00:00 2022-08-02T00:11:31+00:00Answer Link

raja

2

Answers 10 : of composer is not recognized as an internal or external command in windows server

I was facing the same issue in anycodings_php installing the composer command in cmd anycodings_php but when I closed all windows file anycodings_php explorers and again run this command anycodings_php "composer global require anycodings_php laravel/installer " from anycodings_php "**https://laravel.com/docs/8.x**". It anycodings_php just installed without any error

0

2022-08-02T00:11:31+00:00 2022-08-02T00:11:31+00:00Answer Link

jidam

4

Answers 11 : of composer is not recognized as an internal or external command in windows server

remove all your playings with composer anycodings_php path in path variable go to anycodings_php https://getcomposer.org/doc/00-intro.md#using-the-installer

and find Composer-Setup.exe link to anycodings_php that exe.

0

2022-08-02T00:11:31+00:00 2022-08-02T00:11:31+00:00Answer Link

miraj

2

Answers 12 : of composer is not recognized as an internal or external command in windows server

I can solve this problem easily without anycodings_php do anything.

Suppose I'm going to create a project in anycodings_php my desktop and facing the problem which anycodings_php you have shown in the description. now anycodings_php follow the step.

Project folder on desktop

Step 1: go you your CMD(Command Prompt) anycodings_php of your Computer

step 2:Select the folder by command here anycodings_php like image (cd/desktop/example folder)

Step 3: After select the folder now anycodings_php write the command which you want to do anycodings_php like screenshot . you can see Im writing anycodings_php the command for laravel.

done, just easy step you can work anycodings_php anything from here and you can see anycodings_php downloading and being prepare for the anycodings_php project

0

2022-08-02T00:11:31+00:00 2022-08-02T00:11:31+00:00Answer Link

joy

How do you fix composer is not recognized as an internal or external command?

C:\Users\Q c>composer 'composer' is not recognized as an internal or external command, operable program or batch file..
Closing all command windows and reopening them - this will "refresh" the PATH..
Restarting your computer..
Uninstall and reinstall composer..

How do I enable composer?

Simply follow these steps:.
Install PHP on your computer. ... .
Once XAMPP is installed, download the latest version of Composer..
Run Composer installation wizard. ... .
Another window will pop up and ask you to locate the PHP command line. ... .
You will be prompted with Proxy Settings..

How do I install composer on Windows 10?

How to Install Composer and PHP on Windows 10.
Download and Install Visual C++ In order to run PHP on Windows 10, you will need to install Visual C++ Redistributable for Visual Studio. ... .
Download and Extract PHP. ... .
Download and Install Composer. ... .
Test PHP. ... .
Add Path Environment Variable. ... .
Test Composer. ... .
77 replies..

How do I check if composer is installed?

You can check your installed composer version using a command composer -v at the current path. Such as: composer -v.