Summer Sale! All accounts are 50% off this week.

kaizenKid's avatar

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

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

0 likes
12 replies
bashy's avatar

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

kaizenKid's avatar

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's avatar

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

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

kaizenKid's avatar

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

bashy's avatar

No problem. For Windows, I think that's a good option. Laravel based as well so ;)

leadqual1's avatar

My fix was to add the following to my php.ini file.

curl.cainfo = C:\Users\me\certs\cacert.pem

Please or to participate in this conversation.