Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why Whoops! error showing in codeigniter-4

i just copy codeingiter 4 in my XAMPP for Linux 7.4.3 which have PHP Version 7.4.3 but getting error like
Whoops!

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

like image 849
Muhammad Farhan Avatar asked Sep 18 '25 07:09

Muhammad Farhan


2 Answers

Rename the env file as .env, then remove # from CI_ENVIRONMENT and modify

CI_ENVIRONMENT = production 

into

CI_ENVIRONMENT = development
like image 76
Boominathan Elango Avatar answered Sep 23 '25 13:09

Boominathan Elango


By Defaults CI 4 comes with production platform so it not showing the errors on the frontend. To see the errors, Open .htaccess file from the root and then enter

SetEnv CI_ENVIRONMENT development

it change the environment to development the alternate way open .env file and then change the CI_ENVIRONMENT to development like that

CI_ENVIRONMENT = development

Remember don't forget to remove # from the begining

like image 40
Pirate of KGP Avatar answered Sep 23 '25 13:09

Pirate of KGP