title: PHP - Installing Composer - failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known
body: <p>I am attempting to use the <a href="http://getcomposer.org/" rel="noreferrer">Composer Dependency Manager</a> for PHP, but I am experiencing the following issue when I use the Composer-Setup.exe (Win32 installer).</p>
  
  <pre><code>Download failed: php_network_getaddresses: getaddrinfo failed: No such host is known. 
  failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known. 
  Download failed: php_network_getaddresses: getaddrinfo failed: No such host is known. 
  failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known. 
  Download failed: php_network_getaddresses: getaddrinfo failed: No such host is known. 
  failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known. 
  The download failed repeatedly, aborting.`
  </code></pre>
  
  <p>I followed the advice on several other stackoverflow threads for that error, and I've checked some other forums. In my php.ini, I have made sure I have the following options:</p>
  
  <pre><code>allow_url_fopen = On
  allow_url_include = On
  extension=php_openssl.dll
  </code></pre>
  
  <p>I also tried the <a href="http://getcomposer.org/doc/00-intro.md#using-the-installer" rel="noreferrer">manual installation</a> of Composer, which asks you to execute:</p>
  
  <pre><code>php -r "eval('?&gt;'.file_get_contents('https://getcomposer.org/installer'));"
  </code></pre>
  
  <p>I get the same error from that. However, If I remove "/installer", it can retrieve the source. I have verified that that the "/installer" URL works. What configuration could cause this behavior? I'm running PHP 5.4 on 32-bit Windows 7.</p>
  
  <p>Thanks,
  Andrew</p>