CodeIgniter Forums

Full Version: Rather pointless error message
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying out CI4 beta 1.

The demo page works, but when I try to retrieve stuff from the database it crashes with this message:

Quote:Whoops!

We seem to have hit a snag. Please try again later...

How to turn this off so that I can see actual error messages?

Setting

Code:
SetEnv CI_ENVIRONMENT development


has no effect.
What you did used to work. I now rename env to .env and set the value there.

CI_ENVIRONMENT = development
That's the production generic error message (usually a 500), so definitely need to get you into development mode. If what you tried didn't work check out @donpwinston's example. You could also set your log level in app/Config/Logger.php (e.g. `public $threshold = 5;`) and then check the error message in your logs.
(04-03-2019, 02:09 PM)donpwinston Wrote: [ -> ]What you did used to work. I now rename env to .env and set the value there.

CI_ENVIRONMENT = development

Could you elaborate? Where is env?
(04-04-2019, 02:58 AM)primadonna Wrote: [ -> ]
(04-03-2019, 02:09 PM)donpwinston Wrote: [ -> ]What you did used to work. I now rename env to .env and set the value there.

CI_ENVIRONMENT = development

Could you elaborate? Where is env?

It's a file at the top level of the CI installation, alongside app, system, license.txt, ...etc
(04-04-2019, 07:11 AM)donpwinston Wrote: [ -> ]It's a file at the top level of the CI installation, alongside app, system, license.txt, ...etc

That works, thanks.