#39;composer#39; is not recognized as an internal or external command in windows server(“composer在 Windows 服务器中未被识别为内部或外部命令)
问题描述
我使用的是 windows server 2008 操作系统.我下载
这就是我的 PATH
现在的样子:
我关闭了所有文件资源管理器窗口和命令提示符并启动了一个新的 CMD 并运行 composer --version
并且它成功了!
我希望这可以帮助遇到与我相同问题的人.
I am using windows server 2008 os. i download composer setup.exe and install to my PC . when I try composer install
. I getting an error:
'composer' is not recognized as an internal or external command,
eg:-
c:xampphtdocsshop>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:xamppphp;C:UsersAdministratorAppDataRoamingComposervendorin
For anyone coming here from Google who are facing the same issue. I just managed to solve this issue after all the other "solutions" other people suggested didn't work.
I installed Composer properly and the Environment variable was set but it just wouldn't work.
In my case composer is installed in C:ProgramDataComposerSetupin
and this is exactly what is in my PATH
Environment variable. After messing around a bit trying to fix it I saw that under System variables
under PATH
there is something called PATHEXT
I opened that and added ;.PHAR
to the end of it. So it ended up like this:
And this is what my PATH
is now:
I closed all file explorer windows and command prompts and started a new CMD and ran composer --version
and it worked!
I hope this helps someone facing the same issue as me.
这篇关于“composer"在 Windows 服务器中未被识别为内部或外部命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:“composer"在 Windows 服务器中未被识别为内部或外部命令
基础教程推荐
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- 在多维数组中查找最大值 2021-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01