composer / windows-setup

The Windows installer for the Composer PHP Dependency Manager
MIT License
144 stars 69 forks source link

Installing Composer with PHP on Windows 10 - can't find php.exe? #130

Closed jensenv closed 3 years ago

jensenv commented 3 years ago

I'm attempting to install Composer (current version) and it's reporting it can't find the php.exe. I'm on Windows 10 and have tried several different versions of PHP. Setup log attached. I'm totally new to composer, so maybe it's something I'm doing wrong. Any help appreciated.

Setup Log 2021-01-21 #001.txt

johnstevenson commented 3 years ago

The various php.exe files you are attempting to use do exist, but they do not run correctly (as per log):

2021-01-21 19:57:35.090   $ Running C:\Users\VERNJE~1\AppData\Local\Temp\is-IDUH2.tmp\runphp.exe C:\depot\web\server\php\7.1.32-x64\php.exe
2021-01-21 19:57:35.096   $ Error: exit code [2]
2021-01-21 19:57:35.096   $ Error: [ERR_RUN_PHP]
                          The PHP exe file you specified did not run correctly:
                          C:\depot\web\server\php\7.1.32-x64\php.exe

                          Reported error: The system cannot find the file specified

Open a command prompt and run:

C:\depot\web\server\php\7.1.32-x64\php.exe -v

This will display the PHP version info and hopefully a better error message.

johnstevenson commented 3 years ago

@jensenv Did you ever get to the bottom of this?