title: Install Symfony on Windows behind proxy server with NTLM authentication
body: <p>I tried to downlaod and install Symfony on a server at my company...</p>
  
  <pre><code>c:\&gt; php -r "readfile('http://symfony.com/installer');" &gt; symfony
  </code></pre>
  
  <p>..and got the following error (partly German, but you'll get the idea):</p>
  
  <pre><code>PHP Warning:  readfile(http://symfony.com/installer): failed to open stream: Es konnte keine Verbindung hergestellt werd en, da der Zielcomputer die Verbindung verweigerte.
   in Command line code on line 1
  </code></pre>
  
  <p>So I downloaded it manually over the browser (which worked fine) and tried to create a new site:</p>
  
  <pre><code>php symfony.phar new blog
  </code></pre>
  
  <p>Now I got this error:</p>
  
  <pre><code>[RuntimeException]
  There was an error downloading Symfony from symfony.com server:
  Client error response [url] http://symfony.com/download?v=Symfony_Standard_Vendors_latest.tgz [status code] 407 [re
  ason phrase] Proxy Authentication Required
  
  [GuzzleHttp\Exception\ClientException]
  Client error response [url] http://symfony.com/download?v=Symfony_Standard_Vendors_latest.tgz [status code] 407 [re
  ason phrase] Proxy Authentication Required
  </code></pre>
  
  <p>So I did a step back to see if I can do a cURL request in a PHP script. I used the following script to try it (my company is using a proxy server with NTLM authentication):</p>
  
  <pre><code>$ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, 'http://www.google.com');
  curl_setopt($ch, CURLOPT_HEADER, 0);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_PROXY, 'proxy.company.loc');
  curl_setopt($ch, CURLOPT_PROXYPORT, 8080);
  curl_setopt($ch, CURLOPT_PROXYTYPE, 'HTTP');
  curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
  curl_setopt($ch, CURLOPT_PROXYUSERPWD, 'user:password');
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
  echo curl_exec($ch);
  curl_close($ch);
  </code></pre>
  
  <p>And it worked fine.</p>
  
  <p>What do I have to do to be able to install and use Symfony. Where do I define the proxy, the credentials and the NTLM method? I tried adding HTTP_PROXY in the env vars as "<a href="http://user:password@proxy.company.loc:8080" rel="nofollow">http://user:password@proxy.company.loc:8080</a>", but that didn't help (maybe I also have to add the auth type NTLM somewhere).</p>
  
  <p>The server is a Windows Server 2012 R2. PHP version is 5.6.5 and Apache is on 2.4.12.</p>
  
  <p>Thanks for any help and sorry for any grammar errors!</p>