Accessing OS env variables? |
I'm figuring out how to deploy CI3 project with Kubernetes and ran into a problem with environment variables.
Namely, in my Kubernetes YAML manifests I declare several environment variables depending on the application environment (dev/staging/production). I can see those variables when I run env in container CLI but for some reason, I can't access out those variables with PHP. I tried several things: 1. I configured clear_env = no in my PHP-FPM pool config (www.conf) - Didn't work 2. I configured variables_order = "EGPCS" in php.ini - Didn't work Any suggestions on how do I access OS environment variables? Thanks in advance!
> I can't access out those variables with PHP.
What did you do? and what did you get?
Did you try using this one?
PHP Code: echo $_ENV["VAIABLENAME"]; Try it and see what you get back. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |