Laravel & Xampp: "No application encryption key has been specified."

Published 2 weeks ago by kaizenKid

I'm new to all this.

I'm running windows 10 with Xampp for Php >= 7.0

I've set up everything as instructed on https://www.codementor.io/magarrent/how-to-install-laravel-5-xampp-windows-du107u9ji site.

I keep getting the error "No application encryption key has been specified."

Side note but related: Am I going about this the wrong way?(In terms of making my site "live" locally?) Once I start using a database wouldn't it be easier to use the setup from Xampp?

Thanks in advance

Best Answer (As Selected By kaizenKid)
bashy

@kaizenKid We're all in the same boat! It could be something related to XAMPP. Maybe you can try Laragon https://laragon.org

bashy
bashy
2 weeks ago (1,083,200 XP)

Have you added or generated one for the .env file?

kaizenKid

I ran this command in the project folder. php -r "copy('.env.example', '.env');"

I'm not sure if this is what you're asking about. If that's it then yes I did that.

kaizenKid

I ran this command in the project folder. php -r "copy('.env.example', '.env');"

I'm not sure if this is what you're asking about. If that's it then yes I did that.

sutherland

Run php artisan key:generate

kaizenKid

@sutherland I did that and it updated the .env file.

The key matched the key on my command line, just double checked.

kaizenKid

@sutherland I did that and it updated the .env file.

The key matched the key on my command line, just double checked.

bashy
bashy
1 week ago (1,083,200 XP)

@kaizenKid Did you cache the config at all? php artisan config:clear

kaizenKid

@bashy I did not do that initially do. I just did that and I'm still getting the same issue.

kaizenKid

@bashy I did not do that initially do. I just did that and I'm still getting the same issue.

bashy
bashy
1 week ago (1,083,200 XP)

@kaizenKid Not sure then :(

kaizenKid

@bashy and @sutherland just wanted to say thanks for the help. I didn't know the community was so helpful to new people.

kaizenKid

@bashy and @sutherland just wanted to say thanks for the help. I didn't know the community was so helpful to new people.

bashy
bashy
1 week ago (1,083,200 XP)

@kaizenKid We're all in the same boat! It could be something related to XAMPP. Maybe you can try Laragon https://laragon.org

kaizenKid

@bashy it worked like a charm. Thanks!

kaizenKid

@bashy it worked like a charm. Thanks!

Sign In or create a forum account to participate in this discussion.