500 | Server Error - Laravel

Asked

Viewed 16,148 times

4

I created a new project in Laravel with the command laravel new server. I updated the Poser, inside the same, with composer update.

However, when accessing the http://localhost:8000/, it returns me the following error:

500 | Server Error

I am using windows. Someone knows how to solve?

  • See which error is giving, in the file Laravel.log, is inside Storage/logs, there put here that I try to help you! ;)

  • Man, it returns me a content of 67 lines. The first one tells me this: Production.ERROR: No application Encryption key has been specified.

  • Rotate the remote php artisan key:generate to generate the key

  • Now this: "Errorexception : file_get_contents(C: Users Free Documents Luiz larang server.env): failed to open stream: No such file or directory". I checked inside the site, the . env does not exist at all, only the .env.example example

  • 2

    The archive C:\Users\Free\Documents\luiz\larang\server\.env does not exist. I advise you to read the Framework installation documentation, otherwise the comments will become chat...

1 answer

12


One of the solutions was to access the project folder, via cmd, and run the following command:

copy .env.example .env

This when there is not the '.env' file automatically created in the folder, and then:

php artisan key:generate

Then it was just a spin php artisan serve normally.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.