Hi all,
I can't switch to production mode. I still have the CI_ENVIRONMENT variable set to development.
I use the.env file.
I changed the CI_ENVIRONMENT production line in the .env file (uncommented).
I checked my .htaccess file in the public folder (just to be sure, no SetEnv here).
It's very strange. With the CI_ENVIRONMENT production in the .env file, if I check $_ENV array, I can see CI_ENVIRONMENT still set to development.
But, if I check $_SERVER array, I can see CI_ENVIRONMENT set to production.
If change again in development and check again the two arrays, I see $_ENV still in development and $_SERVER has been updated in development.
Seems that the framework update only the $_SERVER array from my .env file change.
Other variables, like an API token, are updated in both arrays and I can see the variable updated using env() function.
I ran out of ideas. Any help to understand this?