Php Composer不下载

Php Composer不下载,php,proxy,composer-php,Php,Proxy,Composer Php,我安装了作曲家,所有作品都很好。当我运行composer-V时,我只收到一个关于Xdebug的警告 You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug Composer version 1.0-dev (4c0e163977f8289288df7b37e0fd0469d3e8cbc6) 201

我安装了作曲家,所有作品都很好。当我运行
composer-V
时,我只收到一个关于Xdebug的警告

You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Composer version 1.0-dev (4c0e163977f8289288df7b37e0fd0469d3e8cbc6) 2016-02-20 19:28:03
我尝试使用
composer require Slim/Slim“^3.0”
安装Slim Framework,但收到以下错误:

Loading composer repositories with package information                                                                               
  [Composer\Downloader\TransportException]                                     
  The "https://packagist.org/packages.json" file could not be downloaded: SSL  
  : Connection reset by peer                                                   
  Failed to enable crypto                                                      
  failed to open stream: operation failed
我不确定,但我认为问题在于代理,所以我尝试了提出的解决方案并进行了验证

还是不行。我也在GitHub上找到了,但任何东西都可以

下面是composer diag的结果:

You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Checking composer.json: FAIL
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
Checking platform settings: FAIL
The xdebug extension is loaded, this can slow down Composer a little.
 Disabling it when using Composer is recommended.

Checking git settings: OK
Checking http connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "http://packagist.org/packages.json" file could not be downloaded (HTTP/1.1 502 Proxy Error ( The URL does not use a recognized protocol. There is no support for the protocol or application not )
Checking https connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL: Connection reset by peer
Failed to enable crypto
failed to open stream: operation failed
Checking HTTP proxy: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL: Connection reset by peer
Failed to enable crypto
failed to open stream: operation failed
Checking HTTP proxy support for request_fulluri: FAIL
Unable to assess the situation, maybe packagist.org is down (The "http://packagist.org/packages.json" file could not be downloaded (HTTP/1.1 502 Proxy Error ( O URL não usa um protocolo reconhecido. Não há suporte para o protocolo ou a solicitação não ))
Checking HTTPS proxy support for request_fulluri: FAIL
Unable to assess the situation, maybe github is down (The "https://api.github.com/repos/Seldaek/jsonlint/zipball/1.0.0" file could not be downloaded: SSL: Connection reset by peer
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: Connection reset by peer
Failed to enable crypto
failed to open stream: operation failed
Checking disk free space: OK
Checking pubkeys: 
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: 

  [Composer\Downloader\TransportException]                                     
  The "https://getcomposer.org/version" file could not be downloaded: SSL: Co  
  nnection reset by peer                                                       
  Failed to enable crypto                                                      
  failed to open stream: operation failed                                      


diagnose
还有什么我可以试试的吗

注:


我的操作系统是Ubuntu 14.04,我用它来处理Windows代理(TMG)。除了composer,一切都很好(浏览器、apt get、npm等)

此错误是ssl错误,如果您的Web服务器是apache,操作系统是centos 7,则可以通过以下步骤修复此错误: 1.下载并放入~/.cacert

2.将php.ini添加到此

openssl.cafile= ~/.cacert/cacert.pem
3.重新启动apache

systemctl restart httpd.service

希望能帮助你

啊!!一年前我也遇到了同样的问题,一次尝试了很多方法,不确定哪种方法有效,但包括更新一些关于证书的php设置,以及从Mozilla下载cacert.pem。看看这个,它可能会有所帮助,谢谢,但它对我不起作用。。。
systemctl restart httpd.service