• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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?
Do you want to write tests for your apps? Our book, CodeIgniter Testing Guide would help you.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.