问题描述
我在安装 Composer
时遇到问题.在向导中选择 php.exe
路径后,接下来会显示以下错误描述.
您指定的 PHP exe 文件未正确执行:D:wampinphpphp5.5.12php.exe 从命令行运行可能会突出问题.内部错误 [ERR_INVALID],退出代码 1
我猜这是这里已经问过的问题了.
然后你必须通过在你的 php.ini
文件中注释所有这些扩展来修复这些警告消息.(实际上这些警告消息的原因是因为多次启用这些扩展但是您可以在 php.ini
文件中取消注释它来解决问题).
以我为例.
一).您可以在上图中看到 curl 的警告消息.
Module 'curl' 已经加载到 Unknown 的第 0 行.
b) 要修复此问题,请在您的 php.ini
文件中找到 php_curl.dll
文件,并通过添加分号来注释该扩展名 ";"
在像这样的扩展前面 ;extension=php_curl.dll
如果您对每个扩展有多个警告,请按照上述步骤操作,直到您的 shell 中没有收到任何警告消息.
- 重启你的 xampp ,现在应该加载扩展.
- 现在可以安装 composer 再试一次.
希望我能解决您的问题.
就是这样.编码快乐!!!(amitamie.com) :-) ;-)
I have trouble installing Composer
. After I select the php.exe
path in the wizard and next thing it shows is the below error description.
The PHP exe file you specified did not execute correctly: D:wampinphpphp5.5.12php.exe Running it from the command line might highlight the problem. Internal Error [ERR_INVALID], exit code 1
I guess this is a problem which had been asked here .
composer not install in windows 7
I figured it out and successfully installed Composer in My windows 10 PC.
I am sharing two solutions here.
There are some steps you have to follow in order to solve your problem.
1st solution.
- Find and Open
php.ini
located in your "php" folder In my case it is in xampp the file is inc:xamppphp
- Find
"extension=php_openssl.dll"
";extension=php_openssl.dll"
uncomment by removing the semicolon";"
- Restart your xampp , now extension should be loaded after that.
- Try again now you are able to install composer.
2nd solution(If the above solution didn't work for you then go with one below. )
This works in my case
- Find and Open
php.ini
located in your "php" folder In my case it is in xampp the file is inc:xamppphp
- Open SHELL from Xampp start panel by clicking on shell button.
- Write
php
in shell and hit enter - If you get some warning message in your shell that looks like the image below:
Then you have to fix these warning message by commenting all these extension in your
php.ini
file.(Actually cause of these warning messages are because more than one time these extensions are enabled but you can un-comment it inphp.ini
file to solve the issue).For Example which is in my case.
a). You can see in above image there is warning message for curl.
Module 'curl' already loaded in Unknown on line 0 .
b) To fix this find
php_curl.dll
file in yourphp.ini
file and comment that extension by adding semicolon";"
in front of that extension like this;extension=php_curl.dll
Follow above steps if you have more than one warning for each extension until you are not getting any warning message in your shell.
- Restart your xampp , now extension should be loaded after that.
- Try again now you are able to install composer.
Hope I can solve your issue .
That's all folks . Happy coding !!! (amitamie.com) :-) ;-)
这篇关于安装 Composer - 内部错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!