1
I would like to add a linux environment variable for my differents applications written in PHP and Ruby.
Its goal is to differntiate between 'production' and 'development' linux environment.
How to have an linux environment variable (ex : APPLICATION_ENV='production') that can be accessed with PHP and Ruby?
thanks
Edit 1 :
My first solution was :
for Apache/PHP in vhost :
SetEnv APPLICATION_ENV 'production'
for Ruby :
export APPLICATION_ENV='production'
puts ENV['APPLICATION_ENV']
However, this is two places to the same value... There are no solution to merge it in one place ? par exemple to use /etc/environment
PHP with Apache, can use this variable ? – Bastien D – 2013-07-04T14:17:56.507