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

Cannot download any file with https behind the proxy #3120

Closed
NTag opened this issue Jul 11, 2014 · 5 comments
Closed

Cannot download any file with https behind the proxy #3120

NTag opened this issue Jul 11, 2014 · 5 comments

Comments

@NTag
Copy link

NTag commented Jul 11, 2014

I am using Composer version e77435c 2014-07-02 15:44:54.

I am using a proxy; wget, curl and my browser are working.

But composer cannot download any file in https, and gives ssl errors.

composer diag:

Checking platform settings: OK
Checking git settings: OK
Checking http connectivity: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
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: SSL operation failed with code 1. OpenSSL Error messages:
error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
failed to open stream: Cannot connect to HTTPS server through proxy
Checking HTTP proxy support for request_fulluri: OK
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: Peer certificate CN=`*.github.com' did not match expected CN=`myproxy.fr'
failed to open stream: Cannot connect to HTTPS server through proxy)
Checking disk free space: OK
Checking composer version: 


  [Composer\Downloader\TransportException]                                                                                       
  The "https://getcomposer.org/version" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:  
  error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure                                               
  failed to open stream: Cannot connect to HTTPS server through proxy

http_proxy and https_proxy are seted.
php version: PHP 5.6.0RC2 (cli) (built: Jul 8 2014 08:41:48)
OpenSSL version: OpenSSL/1.0.1i
cURL version: 7.37.0

@stof
Copy link
Contributor

stof commented Jul 11, 2014

@rdlowrey do you have an idea ?

@rdlowrey
Copy link

This is actually a bug in the 5.6 implementation that someone else recently stumbled upon and brought to my attention. It's 100% a problem in RC2 (and all previous 5.6 builds) where if you're behind an HTTP proxy you cannot connect to an encrypted resource with streams.

I'll be working on this over the next couple of days and hope to have it sorted this weekend. So until RC3 there's not really anything you can do if you're behind a proxy.

I will update the issue once the bug is fixed in php-src. Thanks for the ping and thanks to @NTag for trying out the release candidates to help find bugs like this before 5.6 is released 👍

@rdlowrey
Copy link

Oh, BTW @stof as I'm debugging I see this line in the output (bold mine):

Unable to assert the situation, maybe github is down (The "https://api.github.com/repos

That should probably be assert assess. It's no big deal and maybe nobody cares but I thought I'd point it out in case someone wants to change it (also most of the best programmers I know aren't native English speakers).

@rdlowrey
Copy link

I've verified the bug and fixed this locally. After I submit the report at bugs.php.net and commit the necessary changes to php-src I'll post here with the relevant links so you can close the issue (later this evening or tomorrow).

For completeness note that I now see the following output behind a proxy server (locally) where before I was receiving the original error.

$ ~/build/bin/php ../composer.phar diag
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity: OK
Checking HTTP proxy: OK
Checking HTTP proxy support for request_fulluri: OK
Checking HTTPS proxy support for request_fulluri: OK
Checking disk free space: OK
Checking composer version: OK

@rdlowrey
Copy link

This problem has been fixed in the PHP-5.6 and master branches by commit f3bf887e6d. The 5.6.0RC3 release will incorporate these changes.

The full bug report and analysis can be found here:
https://bugs.php.net/bug.php?id=67609

Please let me know if further problems arise and thanks again for using the RC releases to help eliminate as many bugs as possible prior to the official release 👍 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants