'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...
Solution 1:[1]
Rename the env file as .env, then remove # from CI_ENVIRONMENT and modify
CI_ENVIRONMENT = production
into
CI_ENVIRONMENT = development
Solution 2:[2]
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
Solution 3:[3]
Pleaase try to install using composer go to htdocs folder composer create-project codeigniter4/appstarter project-root -s rc replace project-root by your project folder name and then cd your_project_name
Solution 4:[4]
CodeIgniter starts up in production mode. This is a safety feature to keep your site a bit more secure in case settings are messed up once it is live. So first let’s fix that. Copy or rename the env
file to .env
. Open it up. Uncomment the line with CI_ENVIRONMENT
on it, and change production
to development
:
CI_ENVIRONMENT = development
If you are using XAMPP, write extension = intl
in the PHP file (php.ini
).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Boominathan Elango |
Solution 2 | Pirate of KGP |
Solution 3 | Samyam Bhandari |
Solution 4 | Jeremy Caney |