Welcome Guest, Not a member yet? Register   Sign In
Can't switch to production mode
#1

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?
Reply


Messages In This Thread
Can't switch to production mode - by Jag81 - 12-14-2021, 09:48 AM
RE: Can't switch to production mode - by Jag81 - 12-14-2021, 10:04 AM
RE: Can't switch to production mode - by InsiteFX - 12-15-2021, 01:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB