4

I'm not able to download lavarvel installer using composer 1.2.0 (latest version) The error received: Failed to open stream: HTTP request failed! I googled and could not find the answer to fix this to problem.

If possible, someone please try to run this command composer global require "laravel/installer" to check if it works? I think the link to packaglist is no longer valid but I'm not sure.

enter image description here

C:\wamp\www\st>composer self-update -vvv
Reading ./composer.json
Loading config file ./composer.json
Checked CA file C:\Users\Louis\AppData\Local\Temp\composer-cacert-bcf331364fef73d53e4368ba519a6c3fcb21ea7836c3d8efad4ec32731e8152a.pem: valid
Executing command (C:\wamp\www\st): git branch --no-color --no-abbrev -v
Executing command (C:\wamp\www\st): git describe --exact-match --tags
Executing command (C:\wamp\www\st): git log --pretty="%H" -n1 HEAD
Reading C:/Users/Louis/AppData/Roaming/Composer/composer.json
Loading config file C:/Users/Louis/AppData/Roaming/Composer/composer.json
Running 1.2.0 (2016-07-19 01:28:52) with PHP 5.5.12 on Windows NT / 6.2
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Downloading https://getcomposer.org/versions
You are already using composer version 1.2.0 (stable channel).
Louis Tran
  • 1,154
  • 1
  • 26
  • 46

5 Answers5

2

Two ways of laravel install(normally i follow step 1)

step 1.

  • download zip file from github https://github.com/laravel/laravel
  • and unzip and put it on wamp/www(where you normally put your project)
  • wamp>www>folderproject>shift+right click>open command window here> write on composer composer install

step 2.

go to wamp>www>hold shift and click right mouse ->open command window here->paste composer create-project laravel/laravel in command prompt then go to laravel project then shift+ right click ,open command window here>write php artisan serve

Config Laravel

• after install laravel then goes to wamp>www>laravelproject • copy from here .env.example ,and paste it here then .env - Copy.example will create, • then open sublime ,go to .env - Copy.example file right click and rename to .env and enter • then goes to wamp>www>laravelproject ,shift+right click ,write php artisan key:generate in command promt

Borna
  • 538
  • 4
  • 19
1

I figured it out this morning. The problem was Kaspersky Internet Security blocked the connection between my PC and packagist.org . I am surprised that it never happened to anyone but me.

*** Solution: - Disable your antivirus for a momment and run the command installing Laravel.

Thank you all.

Louis Tran
  • 1,154
  • 1
  • 26
  • 46
0

Hey i guess you using php 5.5 first upgrade your php version then install use

composer global require "laravel/installer"

if you don't want upgrade your php then use

composer global require "laravel/installer=~1.1"

Hamelraj
  • 4,676
  • 4
  • 19
  • 42
  • can you try create new project using composer `composer create-project --prefer-dist laravel/laravel blog` – Hamelraj Sep 08 '16 at 04:35
  • Uninstall evrything and upgrade php version then try to reinstall then if u get error give ur teamviewr – Hamelraj Sep 08 '16 at 05:03
0

I believe your problem is that the config.json-file for Composer has ""packagist": false" inside the file. Try opening the file and changing to : true"

Or run,

cd ~/.composer/vendor/bin

Then

composer global require "laravel/installer"

n31l
  • 93
  • 1
  • 11
0

you can easily first disable your antivirus , then check your version of php that you are using make sure that it is above PHP VERSION 5.5 then open your terminal or cmd then go to directory of composer then paste `composer global require "laravel/installer"