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
#2

Solved!
I need to restart php spark serve
Reply
#3

Any time you make any changes you do need to re-start the server.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB