简体   繁体   中英

Windows composer install issue

I'm trying to install composer via the composer-setup.exe from http://getcomposer.org/download/ and I'm getting the following error:

Connection Error [ERR_CONNECTION]: Unable to connect to getcomposer.org

Request to https://getcomposer.org/installer failed with errors: SSL: The operation completed successfully. . Send of 25 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host. . Send of 23 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host. . Send of 2 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host. . Failed to open stream: HTTP request failed!

I tried disabling my antivirus/firewall but I keep on getting the same error. I searched google but couldn't resolve this. Any help here? Thanks.

Is SSL enabled in the correct php.ini?

If the installation approach via the windows executable fails, you might switch to just downloading the composer.phar to your PHP dir, eg C:\\php\\composer.phar .

Then add composer.bat file inside the C:\\php folder which forwards commands to the PHAR file:

@ECHO OFF
php "%~dp0composer.phar" %*

Also add the path to your php directory (eg C:\\php ) to the Path in your System variables. This result in a global installaton of composer. You can call composer on any project path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM