CodeIgniter Forums
Rather pointless error message - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Rather pointless error message (/showthread.php?tid=73233)



Rather pointless error message - primadonna - 04-03-2019

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.


RE: Rather pointless error message - donpwinston - 04-03-2019

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

CI_ENVIRONMENT = development


RE: Rather pointless error message - MGatner - 04-03-2019

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.


RE: Rather pointless error message - primadonna - 04-04-2019

(04-03-2019, 01: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?


RE: Rather pointless error message - donpwinston - 04-04-2019

(04-04-2019, 01:58 AM)primadonna Wrote:
(04-03-2019, 01: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


RE: Rather pointless error message - primadonna - 04-04-2019

(04-04-2019, 06: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.