php - For some unknown reason, composer will report SSL: Handshake timed out when encountering https, and Google has no results.
typecho
typecho 2017-06-10 09:47:35
0
5
3867
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL: Handshake timed out

Execution: composer diagnose check display

[root@iZm5e5k2yby7w6yyixdif3Z .composer]# composer diagnose
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: WARNING
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL: Handshake timed out
Failed to enable crypto
failed to open stream: operation failed
Checking github.com rate limit: FAIL
[Composer\Downloader\TransportException] The "https://api.github.com/rate_limit" file could not be downloaded: SSL: Handshake timed out
Failed to enable crypto
failed to open stream: operation failed
Checking disk free space: OK
Checking pubkeys: FAIL
Missing pubkey for tags verification
  ssing pubkey for dev verification
Run composer self-update --update-keys to set them up
Checking composer version: 
                                                                                                 
  [Composer\Downloader\TransportException]                                                       
  The "https://getcomposer.org/versions" file could not be downloaded: SSL: Handshake timed out  
  Failed to enable crypto                                                                        
  failed to open stream: operation failed                                                        
                                                                                                 

diagnose

implement

 php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"

show

PHP Warning:  copy(): SSL: Handshake timed out in Command line code on line 1
PHP Warning:  copy(): Failed to enable crypto in Command line code on line 1
PHP Warning:  copy(https://install.phpcomposer.com/installer): failed to open stream: operation failed in Command line code on line 1
typecho
typecho

Following the voice in heart.

reply all(5)
三叔

Open php.ini and increase the default_socket_timeout value. For example: default_socket_timeout=360 (default is -1 or 60)

Peter_Zhu

I think this is a weird situation, either

  • Climb the wall

  • Use domestic composer image

给我你的怀抱

Try changing to domestic mirror

曾经蜡笔没有小新

Try using a browser to request https://install.phpcomposer.com/installer, download the file and transfer it to the server and rename it to composer-setup.php

学霸

It’s just that the network is poor. Or it doesn’t make sense. . .

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template