![]() |
i update to 4.4 , codeigniter 4.4 info message: "Fatal error: Uncaught Error: Undefined constant "CodeIgniter\ENVIRONMENT" in H:\HELPER\SERVER\htdocs\ciall\ci4\ci43\vendor\codeigniter4\framework\system\CodeIgniter.php on lineĀ 581"
protected function bootstrapEnvironment() { if (is_file(APPPATH . 'Config/Boot/' . ENVIRONMENT . '.php')) { require_once APPPATH . 'Config/Boot/' . ENVIRONMENT . '.php'; line 581 } else { // @codeCoverageIgnoreStart header('HTTP/1.1 503 Service Unavailable.', true, 503); echo 'The application environment is not set correctly.'; exit(EXIT_ERROR); // EXIT_ERROR // @codeCoverageIgnoreEnd } } how to fix it thank you for helping
See this: https://codeigniter4.github.io/CodeIgnit...le-changes
Check out my blog: https://lagbaja.dev
I have the same problem, but I have no idea what to add in routeFiles to enable the env routing again.
I also wonder what to do with the entries in app/Config/Routes.php , do they all need to be removed? Where do I place the routes like this now? PHP Code: $routes->get('{locale}/register', 'Register::index'); Thanks!
nothing has changed. Just the router setup was made separately. All routes are in Routes.php
I would advise everyone who is updating to install a clean appstarter and transfer their files to it.
Thank you!
I can not replace it, we have changed a lot. I merged the changes from the changelog into it on each update. How can I add the env routing again? I also get "Uncaught Error: Undefined constant "CodeIgniter\ENVIRONMENT""
I had to rebuild everything and manually adjust all the data from the appstarter, now it is working again, thank you very much for your help.
(08-30-2023, 11:35 PM)seechiller Wrote: I had to rebuild everything and manually adjust all the data from the appstarter, now it is working again, thank you very much for your help. I put a copy from vendor/codeigniter4/framework/public/index.php to public/index.php > solved "Undefined constant "CodeIgniter\ENVIRONMENT" problem |
Welcome Guest, Not a member yet? Register Sign In |