1

I have a error happening for 2 days now I simply cannot get full L4 source via Composer no matter what I try.

I'm behind Windows 8 & WAMP x64 PHP 5.4 mod_ssl and openssl_module enabled. I tried multiple locations/pc's/networks all throw same error.

http://nodeload.github.com/php-fig/log/zip/fe0936ee26643249e916849d48e3a51d5f5e278b
Following resource cannot be retrived by composer. Here is copy paste out of my terminal:

Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----          9/6/2013     21:42            app
d----          9/6/2013     21:42            bootstrap
d----          9/6/2013     21:42            public
d----         9/10/2013     00:35            vendor
-a---          9/6/2013     21:42         11 .gitattributes
-a---          9/6/2013     21:42         69 .gitignore
-a---          9/6/2013     21:42       2424 artisan
-a---          9/6/2013     21:42        687 composer.json
-a---         9/10/2013     00:29     799883 composer.phar
-a---          9/6/2013     21:42        145 CONTRIBUTING.md
-a---          9/6/2013     21:42        566 phpunit.xml
-a---          9/6/2013     21:42       1795 readme.md
-a---          9/6/2013     21:42        519 server.php


PS C:\wamp\www> php composer.phar install
Loading composer repositories with package information
Installing dependencies
  - Installing psr/log (1.0.0)
    Downloading: 100%
    Downloading: 100%
    Downloading: 100%



  [Composer\Downloader\TransportException]
  The "http://nodeload.github.com/php-fig/log/zip/fe0936ee26643249e916849d48e3a51d5f5e278b" file could not be downloa
  ded: php_network_getaddresses: getaddrinfo failed: No such host is known.
  failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known.



install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-p
rogress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader]
Sterling Duchess
  • 1,970
  • 16
  • 51
  • 91
  • Try a "php composer.phar self-update", if that doesn't work, maybe a fresh copy of Laravel (or the composer.json file at least). http://nodeload.github.com/php-fig/log/zip/fe0936ee26643249e916849d48e3a51d5f5e278b doesn't resolve, so looks like wherever composer is getting that URL from is having issues, packagist maybe? :/ – Sy Holloway Sep 09 '13 at 16:47
  • Have you tried letting Composer do ALL the work, via `php composer.phar create-project laravel/laravel` ?? – Aken Roberts Sep 10 '13 at 04:27

2 Answers2

1

First, you should self-update your composer to ensure you are not triggering an already resolved bug.

If that does not change anything, you can fall back to cloning the original repositories instead of downloading a ZIP. Try the composer install with --prefer-source as option and see what happens.

Usually this will avoid the download from the unavailable resource.

Sven
  • 69,403
  • 10
  • 107
  • 109
0

So I found the solution for this problem:

What causes this exception/error is a redirect from http to https uri. Meaning you need to have MOD_SSL (http.d) and OPENSSL_EXTENSION or PHP_OPENSSL (php.ini) enabled.

What happened in my case was I had a fresh install of WAMP running as always I enabled the OPENSSL extension via WAMP GUI (by left clicking on WAMP icon in try area and then navigating to PHP/Apache settings).

This however only enables OPENSSL for Apache turns out the PHP CLI uses it's own php.ini file and you need to enable the OPENSSL in that one as well.

SOLUTION:
Navigate to your WAMP installation folder */wamp/bin/php(x)/php.ini scroll down to extensions and you fill find a commented line disabling OPENSSL. Uncomment this line and OPENSSL should work for CLI as well.

Sterling Duchess
  • 1,970
  • 16
  • 51
  • 91