composer / windows-setup

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

The Composer installer script did not run correctly [exit code 255] and no output was returned. #146

Closed nooralfonso closed 1 year ago

nooralfonso commented 2 years ago

Here is detail of log file :

2022-11-01 10:09:34.543 Log opened. (Time zone: UTC+07:00) 2022-11-01 10:09:34.543 Setup version: Inno Setup version 6.2.0 2022-11-01 10:09:34.543 Original Setup EXE: C:\Users\appadm\Downloads\Composer-Setup.exe 2022-11-01 10:09:34.543 Setup command line: /SL5="$410D6,882897,831488,C:\Users\appadm\Downloads\Composer-Setup.exe" 2022-11-01 10:09:34.543 Windows version: 10.0.17763 (NT platform: Yes) 2022-11-01 10:09:34.543 64-bit Windows: Yes 2022-11-01 10:09:34.544 Processor architecture: x64 2022-11-01 10:09:34.544 User privileges: Administrative 2022-11-01 10:09:34.551 Administrative install mode: Yes 2022-11-01 10:09:34.551 Install mode root key: HKEY_LOCAL_MACHINE 2022-11-01 10:09:34.551 64-bit install mode: No 2022-11-01 10:09:34.557 Created temporary directory: C:\Users\appadm\AppData\Local\Temp\2\is-CFR9Q.tmp 2022-11-01 10:09:34.573 -- DLL function import -- 2022-11-01 10:09:34.573 Function name: SetEnvironmentVariableW 2022-11-01 10:09:34.573 DLL name: kernel32.dll 2022-11-01 10:09:34.573 Dest DLL name: kernel32.dll 2022-11-01 10:09:34.574 Importing the DLL function. 2022-11-01 10:09:34.574 Successfully imported the DLL function. Delay loaded? Yes 2022-11-01 10:09:34.574 -- DLL function import -- 2022-11-01 10:09:34.574 Function name: ExpandEnvironmentStringsW 2022-11-01 10:09:34.574 DLL name: kernel32.dll 2022-11-01 10:09:34.574 Dest DLL name: kernel32.dll 2022-11-01 10:09:34.574 Importing the DLL function. 2022-11-01 10:09:34.574 Successfully imported the DLL function. Delay loaded? Yes 2022-11-01 10:09:34.574 -- DLL function import -- 2022-11-01 10:09:34.574 Function name: SendMessageTimeoutW 2022-11-01 10:09:34.574 DLL name: user32.dll 2022-11-01 10:09:34.574 Dest DLL name: user32.dll 2022-11-01 10:09:34.574 Importing the DLL function. 2022-11-01 10:09:34.574 Successfully imported the DLL function. Delay loaded? Yes 2022-11-01 10:09:34.576 Extracting temporary file: C:\Users\appadm\AppData\Local\Temp\2\is-CFR9Q.tmp\acls.bat 2022-11-01 10:09:34.587 Extracting temporary file: C:\Users\appadm\AppData\Local\Temp\2\is-CFR9Q.tmp\runphp.exe 2022-11-01 10:09:34.599 Extracting temporary file: C:\Users\appadm\AppData\Local\Temp\2\is-CFR9Q.tmp\check.php 2022-11-01 10:09:34.600 Extracting temporary file: C:\Users\appadm\AppData\Local\Temp\2\is-CFR9Q.tmp\inicheck.php 2022-11-01 10:09:34.604 Extracting temporary file: C:\Users\appadm\AppData\Local\Temp\2\is-CFR9Q.tmp\installer.php 2022-11-01 10:09:34.609 Extracting temporary file: C:\Users\appadm\AppData\Local\Temp\2\is-CFR9Q.tmp\composer 2022-11-01 10:09:34.613 $ Initializing ComposerSetup 6.3.0 for user: appadm 2022-11-01 10:09:34.613 $ Params: dev=, php=, proxy=, loadinf= 2022-11-01 10:09:34.614 $ Getting path info from registry 2022-11-01 10:09:34.615 $ Searching for PHP in common locations 2022-11-01 10:09:34.616 $ PHP found in 1 location 2022-11-01 10:09:34.835 $ WizardPage [001]: Welcome 2022-11-01 10:09:34.836 $ WizardPage [100]: Installation Options 2022-11-01 10:09:43.430 $ Setup will install 6.3.0 in Standard Mode 2022-11-01 10:09:43.455 $ WizardPage [101]: Settings Check 2022-11-01 10:10:02.595 $ Error, confirmation missing for : C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86\php.exe 2022-11-01 10:10:02.595 Message box (OK): Please confirm you want to use: C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86\php.exe 2022-11-01 10:10:03.916 User chose OK. 2022-11-01 10:10:12.401 $ WizardPage [102]: Running Settings Check 2022-11-01 10:10:12.404 $ -- Checking cmd.exe: C:\Windows\system32\cmd.exe -- 2022-11-01 10:10:12.405 $ -- Execute File -- 2022-11-01 10:10:12.405 $ Working directory: C:\Users\appadm\AppData\Local\Temp\2\is-CFR9Q.tmp 2022-11-01 10:10:12.405 $ Running C:\Windows\system32\cmd.exe /s /c "cd > stdout.txt 2> stderr.txt" 2022-11-01 10:10:12.591 $ Success: exit code [0] 2022-11-01 10:10:12.597 $ Output from stdout [49 bytes] C:\Users\appadm\AppData\Local\Temp\2\is-CFR9Q.tmp 2022-11-01 10:10:12.597 $ Output from stderr [0 bytes] 2022-11-01 10:10:12.597 $ Directory from cmd.exe: C:\Users\appadm\AppData\Local\Temp\2\is-CFR9Q.tmp [C:\Users\appadm\AppData\Local\Temp\2\is-CFR9Q.tmp] 2022-11-01 10:10:12.598 $ -- Checking selected php: C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86\php.exe -- 2022-11-01 10:10:12.598 $ Env: PHPRC=, PHP_INI_SCAN_DIR= 2022-11-01 10:10:12.598 $ Reading VersionInfo data from exe 2022-11-01 10:10:12.599 $ Config: version=7.4.27, id=70427 2022-11-01 10:10:12.599 $ -- Checking if php will execute -- 2022-11-01 10:10:12.601 $ -- Execute File -- 2022-11-01 10:10:12.601 $ Working directory: C:\Users\appadm\AppData\Local\Temp\2\is-CFR9Q.tmp 2022-11-01 10:10:12.601 $ Running C:\Windows\system32\cmd.exe /s /c "runphp.exe "C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86\php.exe" -d error_reporting="E_ALL & ~E_DEPRECATED" -d display_errors=Off -d display_startup_errors=Off -v > stdout.txt 2> stderr.txt" 2022-11-01 10:10:12.999 $ Success: exit code [0] 2022-11-01 10:10:13.006 $ Output from stdout [156 bytes] PHP 7.4.27 (cli) (built: Dec 14 2021 19:52:04) ( NTS Visual C++ 2017 x64 ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies 2022-11-01 10:10:13.006 $ Output from stderr [0 bytes] 2022-11-01 10:10:13.006 $ -- Checking php configuration -- 2022-11-01 10:10:13.007 $ -- Execute File -- 2022-11-01 10:10:13.007 $ Working directory: C:\Users\appadm\AppData\Local\Temp\2\is-CFR9Q.tmp 2022-11-01 10:10:13.007 $ Running C:\Windows\system32\cmd.exe /s /c "runphp.exe "C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86\php.exe" -d error_reporting="E_ALL & ~E_DEPRECATED" -d display_errors=Off -d display_startup_errors=Off check.php > stdout.txt 2> stderr.txt" 2022-11-01 10:10:13.399 $ Success: exit code [0] 2022-11-01 10:10:13.404 $ Output from stdout [94 bytes]

7.4.27|70427|C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86\php.ini|||||1 2022-11-01 10:10:13.404 $ Output from stderr [0 bytes] 2022-11-01 10:10:13.404 $ Config: version=7.4.27, id=70427, ini=C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86\php.ini, other=, cafile=, capath=, missing=, compat=1 2022-11-01 10:10:13.404 $ Ini is compatible: C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86\php.ini 2022-11-01 10:10:13.406 $ Checking php path 2022-11-01 10:10:13.406 $ Registering: Add to System path: C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86 2022-11-01 10:10:13.406 $ Checking composer bin path 2022-11-01 10:10:13.407 $ Registering: Add to System path: C:\ProgramData\ComposerSetup\bin 2022-11-01 10:10:13.407 $ Checking PathExt values for .BAT 2022-11-01 10:10:13.407 $ Registering: Add to User [appadm] path: C:\Users\appadm\AppData\Roaming\Composer\vendor\bin 2022-11-01 10:10:13.413 $ WizardPage [101]: Settings Check 2022-11-01 10:10:13.430 $ Proxy search results User [appadm] registry: ProxyServer found User [appadm] registry: proxy for all protocols found 2022-11-01 10:10:13.438 $ WizardPage [104]: Proxy Settings 2022-11-01 10:10:18.819 $ Registering: Add to User [appadm] environment: http_proxy = 2022-11-01 10:10:18.828 $ UpdateReadyMemo PHP version 7.4.27 C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86\php.exe Proxy: from registry Add to System path: C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86 Add to User [appadm] environment: http_proxy = 2022-11-01 10:10:18.836 $ WizardPage [010]: Ready to Install 2022-11-01 10:10:23.221 $ WizardPage [105]: Running Composer Install 2022-11-01 10:10:23.224 $ Running Composer installer script 2022-11-01 10:10:23.224 $ Setting http_proxy local environment variable 2022-11-01 10:10:23.225 $ -- Execute File -- 2022-11-01 10:10:23.225 $ Working directory: C:\Users\appadm\AppData\Local\Temp\2\is-CFR9Q.tmp 2022-11-01 10:10:23.226 $ Running C:\Windows\system32\cmd.exe /s /c ""C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86\php.exe" -d error_reporting="E_ALL & ~E_DEPRECATED" -d display_errors=Off -d display_startup_errors=Off installer.php -- --no-ansi --quiet > stdout.txt 2> stderr.txt" 2022-11-01 10:10:27.063 $ Success: exit code [255] 2022-11-01 10:10:27.065 $ Output from stdout [0 bytes] 2022-11-01 10:10:27.065 $ Output from stderr [0 bytes] 2022-11-01 10:10:27.065 $ Unsetting http_proxy local environment variable 2022-11-01 10:10:27.066 $ Error: [ERR_INSTALL_UNEXPECTED] The Composer installer script did not run correctly [exit code 255] and no output was returned. 2022-11-01 10:10:27.073 $ WizardPage [010]: Ready to Install 2022-11-01 10:10:27.098 $ WizardPage [106]: Composer Install Errors
johnstevenson commented 2 years ago

The exit code implies that the php installer script threw an exception, but it is strange that no output was returned (via cmd.exe), especially since this functionality has already been checked.

Try running the following in your terminal:

"C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86\php.exe" -r "echo file_get_contents('https://getcomposer.org/versions');"

In theory this should fail, because the log shows that you need to use a proxy (from your Internet settings) and there is no http_proxy environment variable.

johnstevenson commented 1 year ago

Not much we can do if you don't reply.