Whoops! We seem to have hit a snag. Please try again later.
Codeigniter 4 shows an error when I run the CI4 application, Ho
You're running in the production environment and need to change it to a Development or Testing environment to see the error messages within the browser.
There are a few ways to do this, but adding:
SetEnv CI_ENVIRONMENT development
To the Apache httpd.config file is what worked for me.
_t
I had the same problem, I have a simple solution for Mac. - in the project folder, go to 'writable' - select all the folders contained and click on 'get information' - go share and permissions - in 'everyone' select 'read and write' That's it! refresh the page
Not sure what the desired answer is, but:
In any case, a copy of the displayed error (after changing evnironment) or log file will be useful.
In Root folder change: env to .env
Change # CI_ENVIRONMENT = production
to CI_ENVIRONMENT = development
(ensure it is uncommented)
Your error may be related to the knit.php file.
Go to System/Third Party and change: knit.php to Knit.php (Capital)
Reload.
You can check logs file on writable/logs find error information, If your logs information like :
CRITICAL - 2020-04-19 17:44:55 --> Invalid file: template/header.php
#0 F:\xampp\htdocs\ppdb\vendor\codeigniter4\framework\system\View\View.php(224): CodeIgniter\Exceptions\FrameworkException::forInvalidFile('template/header...')
And go fix your error, in my case i am wrong typed name on controller file