define variable in linux that can be access in php

Posted by sweb on Server Fault See other posts from Server Fault or by sweb
Published on 2012-11-03T13:06:37Z Indexed on 2012/11/04 11:05 UTC
Read the original article Hit count: 180

Filed under:
|
|
|

I add a variable in whole linux varibale in /etc/profile

export MYNAME="My Value"

how can i access this value in php source code during run via apache web server? in $_SERVER this value doesn't exist.

just this keys appear on $_ENV:

_ENV["APACHE_RUN_DIR"]  /var/run/apache2
_ENV["APACHE_PID_FILE"] /var/run/apache2.pid
_ENV["PATH"]            /usr/local/bin:/usr/bin:/bin
_ENV["APACHE_LOCK_DIR"] /var/lock/apache2
_ENV["LANG"]            C
_ENV["APACHE_RUN_USER"] www-data
_ENV["APACHE_RUN_GROUP"]    www-data
_ENV["APACHE_LOG_DIR"]  /var/log/apache2
_ENV["PWD"]                 /

© Server Fault or respective owner

Related posts about php

Related posts about linux