title: Can't install Composer on Ubuntu behind proxy
body: <p>I'm trying to install Composer, in order to use Laravel, but I'm behind the company proxy. The proxy is already configured in the system, so</p>
  
  <pre><code>wget --proxy-user=&lt;my_user_name&gt; --proxy-password=&lt;my_password&gt; https://getcomposer.org/installer
  </code></pre>
  
  <p>works (curl doesn't!), and I get the 270kB "installer" file.</p>
  
  <p>Next, I'm trying to run</p>
  
  <pre><code>php installer
  </code></pre>
  
  <p>as the <a href="https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx" rel="nofollow noreferrer">manual</a> says, but then I get the following error:</p>
  
  <pre><code>All settings correct for using Composer
  Downloading...
  Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
  error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
  file_get_contents(https://getcomposer.org/composer.phar): failed to open stream: Cannot connect to HTTPS server through proxy
  </code></pre>
  
  <p>The error repeats 3 times, then the program quits. If I put a "sudo" before the "php", then nothing happens (it gets stuck in the "Downloading..."), as if php was waiting for something. Using</p>
  
  <pre><code>printenv | grep proxy
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>http_proxy=http://&lt;my_proxy_host&gt;:&lt;port_number&gt;/
  ftp_proxy=ftp://&lt;my_proxy_host&gt;:&lt;port_number&gt;/
  all_proxy=socks://&lt;my_proxy_host&gt;:&lt;port_number&gt;/
  ALL_PROXY=socks://&lt;my_proxy_host&gt;:&lt;port_number&gt;/
  socks_proxy=socks://&lt;my_proxy_host&gt;:&lt;port_number&gt;/
  https_proxy=https://&lt;my_proxy_host&gt;:&lt;port_number&gt;/
  no_proxy=localhost,127.0.0.0/8,::1
  </code></pre>
  
  <p>Shouldn't it be working? I'm on a newly installed Ubuntu 14.04. I was following <a href="http://profmarcello.blogspot.com.br/2015/04/instalacao-do-laravel-5-no-ubuntu-1410.html" rel="nofollow noreferrer">this tutorial</a>, and I'm stuck on step 8 (i.e. I already installed Apache and PHP Version 5.5.9-1ubuntu4.9.)</p>
  
  <p>Thanks in advance!</p>
  
  <p>EDIT: This is not a duplicate of <a href="https://stackoverflow.com/questions/17307600/php-composer-behind-http-proxy">this question</a>, because I cannot even INSTALL Composer! The OpenSSL in PHP is NOT the faulty 0.9.8 series (it's 1.0.1f). I've put export HTTP_PROXY_REQUEST_FULLURI=0 and export HTTPS_PROXY_REQUEST_FULLURI=0 at /etc/profile. I have the proxy variables shown above. Perhaps the problem is at the CNTLM stuff? I'll look for it.</p>