the php exe file you specified did not run correctly
В чем проблема composer?
Здравствуйте, при установки composer, выдает такую вот ошибку:
В чем может быть проблема, в php.ini пути прописаны так:
По этим путям все файлы лежат, прошу помочь.
Да, и корректность самих путей проверить нужно.
А остальные расширения подключаются нормально?
Вебсервер запускается нормально?
Экстеншины родные или скачивали отдельно (если версия не та, пхп может делать вид что их не видит)
100500 лет назад когда имел дело с виндой, я добавлял папку php и php/ext в переменную PATH
Composer setup installation error
I’m trying to install Composer on Windows 7 and XAMPP, but getting those errors/messages when run installation setup.
The PHP exe file you specified did not run correctly: C:\xampp\php\php.exe
The php.ini used by your command-line PHP is: C:\xampp\php\php.ini
A duplicate setting in your php.ini could be causing the problem.
Program Output: Warning: Module ‘openssl’ already loaded in Unknown on line 0
I have been googled for while, but could not find proper solution or anything related to this. Closest thing was to remove comment openssl extension in php.ini file, but did not worked for me. To be clear I have very basic understanding of server tweaking.
5 Answers 5
I guess this is a problem which had been asked here you can follow the solution or go to the below link whichever if you want.
I figured it out and successfully installed Composer in My windows 10 PC.
There are some steps you have to follow in order to solve your problem.
1st solution.
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 in c:\xampp\php\
Open SHELL from Xampp start panel by clicking on shell button.
Write php in shell and hit enter
Then you have to fix these waring message by commenting all these extension in your php.ini file.(Actually cause of these warning messages are because more than one times that extension are enabled or you can say un-commented in php.ini file).
For Example which is in my case.
a). You can see in above image there is warning message for curl.
b) To fix this find php_curl.dll file in your php.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 untill you are not getting any warning message in your shell.
The PHP exe file you specified did not run correctly [exit code 1] #80
Comments
CJDennis commented Oct 25, 2017
I suspect it’s failing because my user name has been rendered as DANIEL
The text was updated successfully, but these errors were encountered:
We are unable to convert the task to an issue at this time. Please try again.
The issue was successfully created but we are unable to update the comment at this time.
johnstevenson commented Oct 25, 2017
CJDennis commented Oct 26, 2017
Yes, however, both setups had ANSICON installed at the time. I managed to get Composer to install by creating another Windows account with a simpler user name.
johnstevenson commented Oct 26, 2017
Thanks. I don’t think the account name is the problem though, if you don’t mind bearing with me (I would really like to get to the bottom of this);
1.KLE\AppData\Local\Temp\is-IC2B8.tmp\stdout.txt 2> C:\Users\DANIEL
This shows that your php.exe successfully ran the installer’s check.php script and, via cmd.exe, piped its output correctly to the 2 temporary txt files. There is nothing reported in stderr and the value from stdout is perfect:
So I have to assume that ANSICON is causing this. However, I cannot reproduce this, so could you please tell me what version of ANSICON you are using and how it is installed. The value/existence of the following AutoRun registry keys would also be very helpful:
Не удается установить Composer с Xampp в Windows
Я пытался установить composer с XAMPP на Windows 10, и установщик выдал следующую ошибку:
Путь к php.exe уже правильный, и я раскомментировал расширения на php.ini.
Спасибо, и я желаю вам, ребята, хорошего дня!
Решение
1. Откройте файл php.ini, расположенный в папке «php», например, в xampp, файл находится в XYZ: \ xampp \ php \
2.Найдите «extension = php_openssl.dll»
3. «; Extension = php_openssl.dll» — удалить «;»
4. Перезапустите ваш xampp (или что вы используете), расширение должно быть загружено после этого.
5.Попробуйте снова установить композитор.
Другие решения
На следующем шаге вам понадобится путь php.exe, чтобы продолжить настройку композитора и указать путь к файлу php.exe.
После установки композитора вы должны включить расширение (php_intl.dll) в файле php.ini. Чтобы включить расширение, зайдите в ваш php.ini и раскомментируйте строку «extension = php_intl.dll» или без dll и просто удалите точку с запятой «;» в начале строки и перезапустите панель управления XAMPP.
Вот как ты это делаешь.
Я попал сюда по почти аналогичной проблеме.
Проблема заключалась в том, что я установил XAMPP в Program Files, который, по-видимому, неправильно обрабатывается установщиком.
Я переустановил XAMPP в корне C: и композитор теперь работает как шарм с PHP7
Я нашел решение сам. Похоже, что Composer несовместим с php 7.0.0. Я скачал и установил Xampp с PHP 5.6.0, и теперь установка прошла успешно.
Cannot install Composer with Xampp on Windows
I’ve been trying to install composer with XAMPP on Windows 10 and the installer gave the following error:
The path to php.exe is already correct and I’ve uncommented the extensions on php.ini.
Thank you, and I wish you guys a good day!
7 Answers 7
If you are using portable XAMPP then you will get similar PHP warning. follow the instruction below to solve the warnings:
to solve extension dir and extension related warning simply change the extension_dir = «\xampp\php\ext» to extension_dir = «./ext»
to solve PHP Warning: Cannot open ‘\xampp\php\extras\browscap.ini’ for reading in Unknown on line 0 zend_mm_heap corrupted
Change: browscap = «\xampp\php\extras\browscap.ini» to browscap = «[directory]:\xampp\php\extras\browscap.ini»
I had the same problem. When I wanted to install composer with XAMPP give me an error with a variable PHPRC was not correct and also I had a problem with the variable «extension_dir =». I solved like this:
Change the variable PHPRC which is in «Environments Variables» of windows. I had C:\Program Files\PHP, I change by C:\Program Files\XAMPP\php. (Probably because I had installed before other versions of PHP as Bitnami).