composer: file could not be downloaded: failed to open stream: Cannot connect to HTTPS server through proxy

Hey there,

I am trying to run composer on a company server which is behind a firewall. I already set HTTP_PROXY and HTTPS_PROXY (+ both in lowercase), it doesn’t seem to help. Also the REQUESTFULLURI flags are set to false! (both HTTP and HTTPS) (I can however connect to HTTPS and HTTP with CURL)

I already googled everything that could help me, unfortunately with no success for my particular problem.

Also the Server runs OpenSSL with v1.0.0 from March 2012

I also ran composer diag:

Checking platform settings: FAIL

Your PHP (5.3.3) is quite old, upgrading to PHP 5.3.4 or higher is recommended.
Composer works with 5.3.2+ for most people, but there might be edge case issues.
Checking http connectivity: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Cannot connect to HTTPS server through proxy
Checking HTTP proxy: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Cannot connect to HTTPS server through proxy
Checking HTTP proxy support for request_fulluri: FAIL
Unable to assert the situation, maybe packagist.org is down (The "http://packagist.org/packages.json" file could not be downloaded (HTTP/1.0 400 Bad Request))
Checking HTTPS proxy support for request_fulluri: FAIL
Unable to assert the situation, maybe github is down (The "https://api.github.com/repos/Seldaek/jsonlint/zipball/1.0.0" file could not be downloaded: failed to open stream: Cannot connect to HTTPS server through proxy)
Checking composer.json: OK
Checking disk free space: OK
Checking composer version:


  [Composer\Downloader\TransportException]
  The "https://getcomposer.org/version" file could not be downloaded: failed to open stream: Cannot connect to HTTPS server through proxy



diagnose

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 19 (2 by maintainers)

Most upvoted comments

OK, in my case there was a problem with IPv6, solved it by disabling it in /etc/sysctl.conf by adding in the bottom

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

and running sudo sysctl -p to reload config

source

On my system it looks like it’s trying to use IPv6 and my firewall was blocking that.

Same here … any suggestion ?