wodby / drupal-php

PHP docker container image for Drupal
https://wodby.com/stacks/drupal
MIT License
60 stars 81 forks source link

Environment variables not available to PHP on 7.1-2.4.7 #42

Closed kees-dev closed 7 years ago

kees-dev commented 7 years ago

Up to version 7.1-2.4.6 I could access envirionment variables with the $_SERVER global. In version 7.1-2.4.7 it looks like $_SERVER mainly contains HTTP header information?

From the command-line I can access environment vars as expected. From webserver perspective $_SERVER does not contain these environment vars.

kees-dev commented 7 years ago

I may have found a solution/workaround. Add this environment variable to your php container: PHP_FPM_CLEAR_ENV: 'no'

csandanov commented 7 years ago

yes, we've recently changed the default value of PHP_FPM_CLEAR_ENV to no, the same as in the default configuration http://php.net/manual/en/install.fpm.configuration.php