How can I access environment variables from php?
If you're using php via http, then you can use the global array HTTP_ENV_VARS where all environment variables are exported. You need to declare this as a global identifier (see second part of code example).