'composer' is not recognized as an internal or external command
For anyone still reading seeking answer (like I did when I found this): simply restarting cmd prompt will not work, you have to restart Windows Explorer or your computer and then both composer and php will work globally.
go to C:\wamp\www\laravel\ in the command prompt,
use "C:\ProgramData\ComposerSetup\bin\composer install" instead of "composer install"
Right Click My PC Icon select propertise
Advance System Setting
-> Advance tab -> Environment variables
-> System Variable -> Click path ->
->Add Line -> C:\composer
Related
Have installed angular CLI via node js command prompt. However, when I launch terminal in VS code, it doesn't allow to type only. PFA screenshot
PFB terminal setting screenshot
Able to run ng commands from node js command prompt outside vs code.
If your problem is not related to default shell in your terminal. Then you check windows settings. Follow the steps -
Open VSCode file location
Go to Compatibility tab in VSCode properties window
Unchecked Run this program in compatibility mode for: option
see the attached files. Try with this solution, it might help you.
This worked for me:
Remove settings file.
Click on view/terminal.
Select default shell.
When I try to use the command java in the PHPStrom Terminal. I got this error :
'java' is not recognized as an internal or external command
But I checked I added in PATH the environment variable and it works perfectly on a terminal outside PhpStorm.
Why ?
You need to restart the Jetbrains Toolbox to update these commands in terminals.
Close PhpStorm
Right click on Jetbrains Toolbox and click on "exit"
Search jetbrains toolbox in windows to launch again
And all commands work in the Phpstorm terminal.
The error is:
Cannot run program "C:\Users\Shahzaib
Imtiaz\PhpstormProjects\CodeCept\composer.json" (in directory
"C:\Users\Shahzaib Imtiaz\PhpstormProjects\CodeCept"):
CreateProcess error=193, %1 is not a valid Win32 application –
Is there any solution for that?
A little bit late, but...
This issue could be a part of an incorrect composer command-line tools settings in the PHPStorm (or there was no configurations for that for your project).
Possible cause:
PHPStorm calls an incorrect startup file.
Incorrect composer installation on Windows.
In Windows PHPStorm doesn't recognize the composer.phar file correctly
In Windows in PHPStorm it's usually calling the composer.phar instead of calling the composer.bat file to run the specific command and an error occurs.
Solution:
One of the possible solutions:
1. I suggest you to install (or check your current installation) composer with the special windows installer
2. Check Windows system Path variable and there must to be the basic path to the folder, where composer were installed:
(for me it is C:\ProgramData\ComposerSetup\bin)
3. Go to your PHPStorm settings (press Shift+Alt+S)
4. Go to Tools -> Command Line Tool Support -> Press Add button
5. Select the "Tool based on Symfony Console" and press OK button:
6. Add an alias to composer (I am usually using composer or c aliases e.t.c)
7. Set the correct path to your php interpreter (in my case it is C:\xampp\php\php.exe )
8. Set the path to your (global i suppose) bin composer folder (in my case it is C:\ProgramData\ComposerSetup\bin\composer.bat) and you must to select a composer.bat file (NOT the composer.phar file) and press Ok.
9. Go to Tools -> Run Command (or press Ctrl+Shift+X) and run the command you wanted.
Hope it will help to someone!
Path in user variable is the default path from the installation:
C:\RailsInstaller\Git\cmd;C:\RailsInstaller\Ruby1.9.3\bin
Path in system variable is directed to:
C:\RailsInstaller\Ruby1.9.3\bin
When I open the Command Prompt with Ruby and Rails, the command prompt says "'ruby' is not recognized as an internal or external command" immediately without any input.
The command prompt worked before. After I re-installed it using various methods due to unsuccessful setup, it got like this.
How can I fix it?
Please restart cmd before running ruby command.
In Windows PC:
To add bin path of your installed ruby to PATH environmental variable
1. right click on "My Computer" -> Properties -> Advanced System Settings -> Environmental Variables -> Select "Path" ->Edit
Example path shown below:
D:\Ruby22\bin;
2. Restart cmd after changes
Refer below image:
Ruby Path setting in Windows 7 and other windows OS
So,
C:\RailsInstaller\Ruby1.9.3.\bin is the place where your ruby.exe is saved?
If that's correct, you should be able to access the ruby commands via the Command Prompt.
When you try: REG QUERY "HKCU\Environment" in the console, is there an output like?:
PATH REG_EXPAND_SZ C:\RailsInstaller\Ruby1.9.3.\bin
Ensure you have the correct x32 or x64 bit version of Ruby
installed.
Ensure you have the PATH environment variable setup, this should be
done automatically if selected upon install.
Lastly ensure you restart your command prompt.
I am running win7 professional 64-bit. I have already installed java, and am trying to install ActiveMQ. The install worked perfectly on a Windows Server 2003 machine but now it is giving me issues on my win7 machine. I download ActiveMQ 5.3.2 extract the files and then try to run the installservice.bat file as administrator and it gives me the following error in command prompt: '"wrapper.exe"' is not recognized as an internal or external command, operable program or batch file.
I had the same issue when using Windows Explorer and right clicking on the InstallService.bat file and selecting "Run As Administrator".
However, this worked for me (without having to change my user control settings):
1) Open a command prompt (right clicking first with "run as administrator").
2) Then navigate to the folder where your batch file is and simply type InstallService.bat.
Ok I feel a little stupid answering my own question but here it goes. Turn off the user control settings in the control panel
I had the same issue with apache-activemq-5.6.0 and solved it this way:
Open cmd.exe as admin (click on Start, type in cmd, right click on the "cmd" program, and choose Run as administrator)
In the cmd.exe window, navigate to your apache-activemq-5.X.X root dir (which contains bin, conf, data, docs, ...)
From there, navigate to bin\win64
Your commmand prompt should show something like:
...\apache-activemq-5.6.0\bin\win64>
Still in the cmd.exe, run InstellService.bat
It does not work if you run something like win64\InstellService.bat while being in bin. You have to actually navigate to bin\win64 first.
The in case you are installing in win 64 bit 2012 Server too, run InstallService.bat under sys32.
Its little confusing but it works.