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...

Muhammad Farhan
  • 55
  • 1
  • 1
  • 5
  • Check out https://stackoverflow.com/questions/60501607/how-to-debug-codeigniter-4 - Same Problem and same solution. – TimBrownlaw Mar 06 '20 at 12:41

5 Answers5

11

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

CI_ENVIRONMENT = production 

into

CI_ENVIRONMENT = development
Boominathan Elango
  • 1,156
  • 2
  • 7
  • 20
3

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

1

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

1

In Codeigniter 4 source code have a folder named

writable

, just update it's access permission. Sometimes it'll help to get rid of Whoops. Also can check the video for Ubuntu / Linux

Anupam M
  • 11
  • 6
0

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).

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77