title: How to get PHP to be able to read system environment variables
body: <p>I am using PHP as PHP-FPM on Centos. I am trying to follow the <a href="http://12factor.net/" rel="noreferrer">http://12factor.net/</a> guidelines of having the settings be stored in environment variables.</p>
  
  <p>I have created a file in /etc/profile.d that sets the environment variables I want, and the environment variables appear when tested in the CLI via Bash i.e. running the bash script:</p>
  
  <pre><code>echo $SOME_SERVER_SETTING
  </code></pre>
  
  <p>shows the correct output.</p>
  
  <p>I have set the clear_env setting to false and variables_order to <code>EGPCS</code>, however, the variable I have set does not show up in PHP either <code>getenv('SOME_SERVER_SETTING')</code> or doing <code>var_dump($_ENV)</code></p>
  
  <p>What other setting needs to be set to allow PHP-FPM to receive all of the server environment variables, and in particular those set through a shell script in /etc/profiles.d on Centos?</p>