4

I setup a Laravel project with composer command. When I open the browser to access the page I get a fatal error like this:

Fatal error: require(): Failed opening required 'C:\xampp\htdocs\Learning Laravel\bootstrap/../vendor/autoload.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\Learning Laravel\bootstrap\autoload.php on line 17.

The file is indeed missing.

So my steps were:

  1. I downloaded composer
  2. Command in CMD:

    composer create-project laravel/laravel laravel5-learning After this I got the error about the missing file.

  3. Then I put the suggested command in CMD:

    composer install

But now I get a new error:

RuntimeException in EncryptionServiceProvider.php line 29:
No supported encrypter found. The cipher and / or key length are invalid.
Borut Flis
  • 15,715
  • 30
  • 92
  • 119

1 Answers1

4

As @Ohgodwhy says, your first error is caused because something in the vendor's code is missing.

So, using:

composer install

Will fix it. After that, as @TimLewis says, you may use:

php artisan key:generate

To generate a valid key in .env, to secure your session and other encrypted data.

vpedrosa
  • 811
  • 1
  • 6
  • 17
  • 1
    While this is correct, try to avoid answering questions by reiterating other users' comments. At least you expanded on them a bit. – Tim Lewis Nov 18 '15 at 21:43
  • Sorry if I caused any trouble, I put it there for other people to see both mixed and easy, because in this situation you usually have to `key:generate` after `composer install` to get it working. – vpedrosa Nov 18 '15 at 22:44