1

Been struggling for hours to solve this with no solution and I'm under a deadline for a client. Any help would be so amazing.

Here's what happened:

  • I set up the initial craft project with craft create
  • This got pushed to Github and other devs have been continuing work
  • We were collaborating just fine on the project back and fourth with changes.
  • In my development I somehow deleted my .env file.
  • Now - I can't get my /admin/dashboard to show up or the craft site at all.
  • I've been playing with the settings in the .env I've been going back and fourth with the /phpMyAdmin/?lang=en page trying to set up and link a database.
  • It seems: the project is fine, the database is fine, but I can't seem to link my database and the craft project and get craft to run at all.

Any tips? Any direction? I am just seeing this in the browser:

This page isn’t working localhost is currently unable to handle this request.
HTTP ERROR 500

Help please! Thanks.

FYI - I am on MacOS running MAMP (From my applications folder) and I have PHP 7.2.11 all installed and running.

Thanks!

1
  • I'm pretty sure it's actually JUST my security key that's gone and I can't figure out how to regenerate or recreate it. That first env is gone. Commented Nov 7, 2018 at 23:11

1 Answer 1

2

Yes, the .env file holds the environmental-specific settings/"secrets" that Craft needs to run. So you'll need to recreate it; here's a template:

https://github.com/craftcms/craft/blob/master/.env.example

More information can be found here: Environmental Configuration

4
  • So helpful! But how do I regenerate the security key for this project? Commented Nov 7, 2018 at 23:10
  • 1
    If no one else is using it, you can just generate any old random number you want to use for it. But if you're working with other devs, I'm sure one of them has the security key that you're using in their .env that they can give to you? Commented Nov 8, 2018 at 0:43
  • Unfortunately I still can't get this thing running. It runs perfectly on the other developers machines and it was running on mine at one point. I got the .env from my other team member and it didn't get this thing running. I'm really desperate to find a solution on this. I appreciate the help though! I've got to keep digging. Commented Nov 8, 2018 at 4:21
  • As well, I was able to spin up a brand new craft project without any issues. I can sign in and everything. Very odd that this project just won't run. Commented Nov 8, 2018 at 4:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.