• Register
0 votes
3.4k views

Problem :

Currently I am using the windows server 2008 os. I download the composer setup.exe and install it to my PC . But when I try to install composer. I face below error:

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

eg:-

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

operable program or batch file.

7 5 2
3,870 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I had the same error in recent past, I just kept repeating my composer installation until it was resolved by this way:

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

2) Run your installer by just clicking on next till the very end.

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

4) It must work now, let us say you want to install the PHP framework from the project directory as follows: cmd=>composer require slim/slim "^3.0".

OR

The solution is very simple you just need to use complete composer path instead of the composer install eg:- C:\ProgramData\ComposerSetup\bin\composer install" instead of "composer install

Just add "C:\ProgramData\ComposerSetup\bin\" to the environment variables, so that now you can use as "composer install".

9 7 4
38,600 points

Related questions

0 votes
1 answer 33 views
33 views
Problem : How to fix this erro: Composer' is not recognized as an internal or external command, operable program or batch file..
asked Mar 6 Wafa Abu Yousef 6.1k points
0 votes
1 answer 130 views
130 views
Problem: psql' is not recognized as an internal or external command, operable program or batch file.
asked Feb 18 Lucky Guy 1.5k points
0 votes
1 answer 46 views
46 views
Problem: make' is not recognized as an internal or external command, operable program or batch file.
asked Feb 18 Lucky Guy 1.5k points
0 votes
1 answer 207 views
207 views
Problem : I am facing following MinGW issue: 'gcc' is not recognized as an internal or external command, operable program or batch file.
asked Nov 18, 2019 peterlaw 6.9k points
0 votes
1 answer 94 views
94 views
Problem : Facing following Node.Js error 'npm' is not recognized as an internal or external command, operable program or batch file.
asked Nov 18, 2019 peterlaw 6.9k points
0 votes
2 answers 697 views
697 views
Problem : I have installed Git for Windows but when I try to use git command in Command Prompt I get the following message: 'git' is not recognized as an internal or external command, operable program or batch file.
asked Nov 18, 2019 peterlaw 6.9k points
0 votes
1 answer 1.1K views
1.1K views
Problem : I have Windows 7 and tried to use the 'make' command but getting following error 'make' is not recognized as an internal or external command, operable program or batch file.
asked Nov 15, 2019 peterlaw 6.9k points
0 votes
1 answer 33 views
33 views
Problem: php is not recognized as an internal or external command operable program or batch file
asked Mar 12 Ifra 24.4k points
0 votes
1 answer 195 views
195 views
I installed WAMP on my computer. After the installation, I created my first php file. I wanted to test it by using the command prompt. php test.php But I got this error instead. 'php' is not recognized as an internal or external command, operable program ... don’t know what’s wrong because I followed the tutorial on how to install WAMP. Any help and guide will be greatly appreciated.
asked Oct 11, 2020 azriel 590 points
0 votes
1 answer 8 views
8 views
Problem android' is not recognized as an internal or external command. Normally this can be fixed easily with a quick Google search, but I haven't found a single another user with this problem. Could someone tell me what the problem is?
asked Apr 7 neeraj 10.5k points