A new `clear_env` option available in PHP FPM pool configuration
This update introduces a new `clear_env` option in PHP's FastCGI Process Manager (FPM) pool configuration. If the `clear_env` option is disabled, environment variables set when running the FPM daemon are preserved and available to scripts. By default, `clear_env` is enabled, preserving current behavior.
Description of problem:
According to http://php.net/manual/en/install.fpm.configuration.php, there is
the clear_env setting for PHP-FPM - starting with PHP 5.4.27. Given RHEL ships
an ancient PHP version by default, this option is unfortunately missing. For
some projects this leads to the result that each environment variable needs to
be explicitly set using 'env[foo] = bar' in the PHP-FPM configuration.
Version-Release number of selected component (if applicable):
php-5.4.16-42.el7
How reproducible:
Everytime, see above and below.
Actual results:
PHP 5.4.16 in RHEL 7 without the clear_env option at PHP-FPM.
Expected results:
PHP 5.4.x in RHEL 7 with the clear_env option at PHP-FPM.
Created attachment 1237075[details]
php-5.4.16-fpm-clear_env.patch
Patch suggestion (as a backport) resulting from the difference between
php-5.4.26.tar.gz and php-5.4.27.tar.gz.
Cross-filed case 01766894 on the Red Hat customer portal.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2018:0889