Welcome Guest, Not a member yet? Register   Sign In
Cannot access ubuntu's enviroment variables from PHP
#1

I'm making a codeigniter website and i need to switch configs between production and development. By default Codeigniter searches for the var 

Code:
CI_ENV

 in PHP's 

Code:
$_SERVER

 superglobal. However when i'm trying to set my own with 

Code:
$ CI_ENV=production
$ export CI_ENV

in my production server.

When i'm trying to access it from 

Code:
$_ENV



Code:
$_SERVER

 or 

Code:
getenv()

 it's not there.

Any ideas why?
Reply
#2

Are you talking about running via CLI?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB