Handling environments using .env |
I started with an .htaccess that was pretty standard:
Code: RewriteEngine On I know CI4 comes with its own .htaccess, but they can sometimes be finicky, so I thought I'd test out using a different one. Per documentation here: https://bcit-ci.github.io/CodeIgniter4/g...s.html#env Seems like I should be able to add this to my .env: Code: CI_ENVIRONMENT = development and then CodeIgniter should start displaying errors instead of "whoops". This does not work for me. The only way I can change the environment to development is with this line in .htaccess: Code: SetEnv CI_ENVIRONMENT development So, then I noticed that the env file in root directory is not prefixed with a dot. I added the dot, but still no love. After that I swapped out my .htaccess file for the one provided by CI4, but still not love. On this page https://bcit-ci.github.io/CodeIgniter4/g...ation.html it seems to indicate that nothing else should need to be done: Quote:When your application runs, this file will be automatically loaded and the variables will be put into the environment. This will work in any environment. If it matters, this is a Ubuntu 16.04 / PHP 7.2 server. What does one do to get the .env file to work? Please point to documentation if available. |
Messages In This Thread |
Handling environments using .env - by skunkbad - 09-29-2018, 06:21 AM
RE: Handling environments using .env - by sv3tli0 - 09-29-2018, 06:55 AM
RE: Handling environments using .env - by skunkbad - 09-29-2018, 07:18 AM
RE: Handling environments using .env - by sv3tli0 - 09-29-2018, 08:47 AM
RE: Handling environments using .env - by happyape - 09-29-2018, 12:44 PM
RE: Handling environments using .env - by sv3tli0 - 09-29-2018, 11:41 PM
RE: Handling environments using .env - by danielsonsilva - 04-30-2020, 03:05 PM
RE: Handling environments using .env - by jreklund - 04-30-2020, 03:22 PM
|