Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Composer installer script was not successful [exit code 1] #91

Closed
dblinov opened this issue Feb 19, 2019 · 22 comments
Closed

The Composer installer script was not successful [exit code 1] #91

dblinov opened this issue Feb 19, 2019 · 22 comments

Comments

@dblinov
Copy link

dblinov commented Feb 19, 2019

Operating System:
Windows Server 2012 R2
IIS

Error Message:
The Composer installer script was not successful [exit code 1].

Script Output:
The "https://getcomposer.org/versions" file could not be downloaded: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Log file:

2019-02-19 08:19:27.618 Log opened. (Time zone: UTC+01:00)
2019-02-19 08:19:27.618 Setup version: Inno Setup version 5.6.1 (u)
2019-02-19 08:19:27.618 Original Setup EXE: C:\Distrib\Composer-Setup.exe
2019-02-19 08:19:27.618 Setup command line: /SL5="$20354,282297,121344,C:\Distrib\Composer-Setup.exe" /SPAWNWND=$10314 /NOTIFYWND=$20304
2019-02-19 08:19:27.618 Windows version: 6.3.9600 (NT platform: Yes)
2019-02-19 08:19:27.618 64-bit Windows: Yes
2019-02-19 08:19:27.618 Processor architecture: x64
2019-02-19 08:19:27.618 User privileges: Administrative
2019-02-19 08:19:27.618 64-bit install mode: No
2019-02-19 08:19:27.633 Created temporary directory: C:\Users\RUBLIN1\AppData\Local\Temp\is-9V1FA.tmp
2019-02-19 08:19:27.633 -- DLL function import --
2019-02-19 08:19:27.633 Function name: SetEnvironmentVariableW
2019-02-19 08:19:27.633 DLL name: kernel32.dll
2019-02-19 08:19:27.633 Dest DLL name: kernel32.dll
2019-02-19 08:19:27.633 Importing the DLL function.
2019-02-19 08:19:27.633 Successfully imported the DLL function. Delay loaded? Yes
2019-02-19 08:19:27.633 -- DLL function import --
2019-02-19 08:19:27.633 Function name: ExpandEnvironmentStringsW
2019-02-19 08:19:27.633 DLL name: kernel32.dll
2019-02-19 08:19:27.633 Dest DLL name: kernel32.dll
2019-02-19 08:19:27.633 Importing the DLL function.
2019-02-19 08:19:27.633 Successfully imported the DLL function. Delay loaded? Yes
2019-02-19 08:19:27.633 -- DLL function import --
2019-02-19 08:19:27.633 Function name: SendMessageTimeoutW
2019-02-19 08:19:27.633 DLL name: user32.dll
2019-02-19 08:19:27.633 Dest DLL name: user32.dll
2019-02-19 08:19:27.633 Importing the DLL function.
2019-02-19 08:19:27.633 Successfully imported the DLL function. Delay loaded? Yes
2019-02-19 08:19:27.633 -- DLL function import --
2019-02-19 08:19:27.633 Function name: DeleteData
2019-02-19 08:19:27.633 DLL name: uninstall:{app}\userdata.dll
2019-02-19 08:19:27.633 Skipping.
2019-02-19 08:19:27.633 -- DLL function import --
2019-02-19 08:19:27.633 Function name: GetResult
2019-02-19 08:19:27.633 DLL name: uninstall:{app}\userdata.dll
2019-02-19 08:19:27.633 Skipping.
2019-02-19 08:19:27.633 Extracting temporary file: C:\Users\RUBLIN
1\AppData\Local\Temp\is-9V1FA.tmp\runphp.exe
2019-02-19 08:19:27.664 Extracting temporary file: C:\Users\RUBLIN1\AppData\Local\Temp\is-9V1FA.tmp\check.php
2019-02-19 08:19:27.664 Extracting temporary file: C:\Users\RUBLIN
1\AppData\Local\Temp\is-9V1FA.tmp\installer.php
2019-02-19 08:19:27.696 Extracting temporary file: C:\Users\RUBLIN1\AppData\Local\Temp\is-9V1FA.tmp\ini.php
2019-02-19 08:19:27.696 Extracting temporary file: C:\Users\RUBLIN
1\AppData\Local\Temp\is-9V1FA.tmp\composer
2019-02-19 08:19:27.696 $ Initializing ComposerSetup 4.10.0 for user: RUBLINOVD
2019-02-19 08:19:27.696 $ Getting path info from registry
2019-02-19 08:19:27.868 $ WizardPage [001]: Welcome
2019-02-19 08:19:27.868 $ WizardPage [100]: Installation Options
2019-02-19 08:25:52.588 $ WizardPage [101]: Settings Check
2019-02-19 08:25:53.678 $ WizardPage [102]: Running Settings Check
2019-02-19 08:25:53.678 $ Checking selected php: C:\Program Files\php\v7.1\php.exe
2019-02-19 08:25:53.678 $ Env: PHPRC=, PHP_INI_SCAN_DIR=
2019-02-19 08:25:53.678 $ Reading VersionInfo data from exe
2019-02-19 08:25:53.678 $ Config: version=7.1.7, id=70107
2019-02-19 08:25:53.678 $ Checking if php will execute
2019-02-19 08:25:53.678 $ -- Execute File --
2019-02-19 08:25:53.678 $ Running C:\Users\RUBLIN1\AppData\Local\Temp\is-9V1FA.tmp\runphp.exe "C:\Program Files\php\v7.1\php.exe"
2019-02-19 08:25:53.881 $ Success: exit code [0]
2019-02-19 08:25:53.881 $ Checking php configuration
2019-02-19 08:25:53.881 $ -- Execute File --
2019-02-19 08:25:53.881 $ Running C:\Windows\system32\cmd.exe /c ""C:\Program Files\php\v7.1\php.exe" -d error_reporting=E_ALL -d display_errors=Off -d display_startup_errors=Off -d error_log= -d log_errors=On check.php > C:\Users\RUBLIN
1\AppData\Local\Temp\is-9V1FA.tmp\stdout.txt 2> C:\Users\RUBLIN1\AppData\Local\Temp\is-9V1FA.tmp\stderr.txt"
2019-02-19 08:25:54.084 $ Success: exit code [0]
2019-02-19 08:25:54.084 $ Output from stdout [67 bytes]
ComposerSetup:7.1.7|70107|C:\Program Files\php\v7.1\php.ini|1|||1
2019-02-19 08:25:54.084 $ Output from stderr [0 bytes]
2019-02-19 08:25:54.084 $ Config: version=7.1.7, id=70107, ini=C:\Program Files\php\v7.1\php.ini, tls=1, cafile=, capath=, compat=1
2019-02-19 08:25:54.084 $ PhpIni: Checking if ini needs updating: C:\Program Files\php\v7.1\php.ini
2019-02-19 08:25:54.100 $ -- Execute File --
2019-02-19 08:25:54.100 $ Running C:\Windows\system32\cmd.exe /c ""C:\Program Files\php\v7.1\php.exe" -d error_reporting=E_ALL -d display_errors=Off -d display_startup_errors=Off -d error_log= -d log_errors=On ini.php "C:\Program Files\php\v7.1" C:\Users\RUBLIN
1\AppData\Local\Temp\is-9V1FA.tmp\php.ini C:\Users\RUBLIN1\AppData\Local\Temp\is-9V1FA.tmp\php.ini.backup > C:\Users\RUBLIN1\AppData\Local\Temp\is-9V1FA.tmp\stdout.txt 2> C:\Users\RUBLIN1\AppData\Local\Temp\is-9V1FA.tmp\stderr.txt"
2019-02-19 08:25:54.303 $ Success: exit code [0]
2019-02-19 08:25:54.303 $ Output from stdout [49 bytes]
ComposerSetup:0|No changes to ini file required
2019-02-19 08:25:54.303 $ Output from stderr [0 bytes]
2019-02-19 08:25:54.303 $ PhpIni: modify=0, status=No changes to ini file required
2019-02-19 08:25:54.303 $ Checking php path
2019-02-19 08:25:54.303 $ Checking composer bin path
2019-02-19 08:25:54.303 $ Registering: Add to System path: C:\ProgramData\ComposerSetup\bin
2019-02-19 08:25:54.303 $ Checking PathExt values for .BAT
2019-02-19 08:25:54.303 $ Registering: Add to User path: C:\Users\RUBLINOVD\AppData\Roaming\Composer\vendor\bin
2019-02-19 08:25:54.303 $ WizardPage [101]: Settings Check
2019-02-19 08:25:54.319 $ WizardPage [106]: Proxy Settings
2019-02-19 08:26:07.991 $ Registering: Add to User environment: http_proxy
2019-02-19 08:26:08.007 $ WizardPage [010]: Ready to Install
2019-02-19 08:26:08.793 $ WizardPage [107]: Running Composer Install
2019-02-19 08:26:08.793 $ Running Composer installer script
2019-02-19 08:26:08.793 $ Setting http_proxy local environment variable
2019-02-19 08:26:08.793 $ -- Execute File --
2019-02-19 08:26:08.793 $ Running C:\Windows\system32\cmd.exe /c ""C:\Program Files\php\v7.1\php.exe" -d error_reporting=E_ALL -d display_errors=Off -d display_startup_errors=Off -d error_log= -d log_errors=On installer.php -- --no-ansi --quiet > C:\Users\RUBLIN
1\AppData\Local\Temp\is-9V1FA.tmp\stdout.txt 2> C:\Users\RUBLIN~1\AppData\Local\Temp\is-9V1FA.tmp\stderr.txt"
2019-02-19 08:27:12.274 $ Success: exit code [1]
2019-02-19 08:27:12.274 $ Output from stdout [275 bytes]
The "https://getcomposer.org/versions" file could not be downloaded: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
2019-02-19 08:27:12.274 $ Output from stderr [0 bytes]
2019-02-19 08:27:12.274 $ Clearing http_proxy local environment variable
2019-02-19 08:27:12.274 $ Error: [ERR_INSTALL_ERRORS]
The Composer installer script was not successful [exit code 1].

                      Script Output:
                      The "https://getcomposer.org/versions" file could not be downloaded: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

2019-02-19 08:27:12.274 $ WizardPage [010]: Ready to Install
2019-02-19 08:27:12.290 $ WizardPage [108]: Composer Install Errors

@johnstevenson
Copy link
Member

I'm guessing that this has something to do with your proxy settings and the value you entered into the Enter proxy url field.

The log doesn't store this value (in case it includes USERNAME:PASSWORD) so I cannot be sure of this.

@johnstevenson
Copy link
Member

Did you fix this? If so it would be polite to tell us what the problem was.

@Njinga
Copy link

Njinga commented Apr 22, 2019

I'm currently having the same problem how you go about fixing thus problem????

@johnstevenson
Copy link
Member

@Njinga If you supply a log file I might be able to help. I guess it is something to do with a proxy.

@Njinga
Copy link

Njinga commented Apr 22, 2019 via email

@johnstevenson
Copy link
Member

Perhaps you could explain how you resolved this issue. @dblinov couldn't be bothered to do it, so your explanation could help others searching for some help.

Thanks.

@dblinov
Copy link
Author

dblinov commented Apr 23, 2019

Perhaps you could explain how you resolved this issue. @dblinov couldn't be bothered to do it, so your explanation could help others searching for some help.

Thanks.

Dear All,

Sorry for not providing solution before.
Initially I had proxy setting in IE internet connection and then I indicated in composer installation that it is already set and script didn't work. Solution was in removing proxy setup in IE and setting it in composer installation dialog indicating required proxy address and port in the string.

@johnstevenson
Copy link
Member

@dblinov Thanks, that is appreciated.

Composer-Setup actually checks for IE Internet Connection values, and should offer you the value if one is found. I'll add some additional logging statements to indicate this has happened.

@inayath123
Copy link

inayath123 commented Sep 25, 2019

I have windows 10 with xampp 3.0.12 (php5.4). I was not able to install composer. I tried below steps it worked for me.

  1. download installer script from https://getcomposer.org/installer
  2. save it in a file called as composer-setup.php
  3. open composer-setup.php in vscode or subline code editor.
  4. replace all https to http and save file.
  5. execute below 3 steps in command promt.

php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

php composer-setup.php

php -r "unlink('composer-setup.php');"

  1. viola! successfully installed composer, you can run: php composer.phar.

Thanks

@tradeerp
Copy link

删除系统的环境变量中的代理设置项就可以了

@zela2154
Copy link

Pouvez vous m'aider à résoudre ce probléme ? j'essaye d'installer composer et ça m'affiche ce probléme.
The Composer installer script was not successful [exit code 1].

Your proxy settings may be causing this error.

Script Output:
The "https://getcomposer.org/versions" file could not be downloaded: failed to open stream: Aucune connexion n’a pu être établie car l’ordinateur cible l’a expressément refusée.

@johnstevenson
Copy link
Member

@ousmane2154 Please create a new issue and follow the instructions to supply a log file.

@danielkatoro
Copy link

danielkatoro commented Mar 18, 2021 via email

@chandara2
Copy link

The Composer installer script was not successful [exit code 1].

Script Output:
Failed to decode zlib stream

It is my problem too now. I try many time with check developer also fail.

@johnstevenson
Copy link
Member

@FernandoLuisMatsinhe
Copy link

i have an error,Script Output: Failed to decode zlib stream. how to do

@Roshan2902
Copy link

same problem

@deepblue633
Copy link

I only restart my router and it worked I don't know how but it fixed it

@danielkatoro
Copy link

danielkatoro commented Oct 11, 2022 via email

@davemaxwell612
Copy link

The Composer installer script was not successful [exit code 1].

Your proxy settings may be causing this error.

Script Output:
The "https://getcomposer.org/versions" file could not be downloaded: php_network_getaddresses: getaddrinfo for C failed: No such host is known.
This is what I get when I try installing composer, I have gone through many comments here but still finding it difficult to understand the explanations. It would be nice if someone really help me out on this. Thanks.

@ataahmaa25
Copy link

The Composer installer script was not successful [exit code 1].

Your proxy settings may be causing this error.

Script Output: The "https://getcomposer.org/versions" file could not be downloaded: php_network_getaddresses: getaddrinfo for C failed: No such host is known. This is what I get when I try installing composer, I have gone through many comments here but still finding it difficult to understand the explanations. It would be nice if someone really help me out on this. Thanks.

Please sir the same problem happened to me if you have solved it please share it with me

@ijazul-haq
Copy link

same problem here

@composer composer locked as off-topic and limited conversation to collaborators Dec 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests