Bug 1410010 - Backport PHP-FPM's clear_env option from 5.4.27 to 5.4.16
Summary: Backport PHP-FPM's clear_env option from 5.4.27 to 5.4.16
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: php
Version: 7.3
Hardware: All
OS: Linux
Target Milestone: rc
: 7.4
Assignee: Remi Collet
QA Contact: David Jež
Lenka Špačková
Depends On:
Blocks: Red Hat1420851 Red Hat1465904 Red Hat1466370
TreeView+ depends on / blocked
Reported: 2017-01-04 08:09 UTC by Robert Scheck
Modified: 2021-06-10 11:47 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Release Note
Doc Text:
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.
Clone Of:
Last Closed: 2018-04-10 16:15:25 UTC
Target Upstream Version:

Attachments (Terms of Use)
php-5.4.16-fpm-clear_env.patch (3.06 KB, patch)
2017-01-04 08:14 UTC, Robert Scheck
no flags Details | Diff

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0889 0 None None None 2018-04-10 16:16:22 UTC

Description Robert Scheck 2017-01-04 08:09:00 UTC
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):

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.

Comment 1 Robert Scheck 2017-01-04 08:14:17 UTC
Created attachment 1237075 [details]

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.

Comment 8 Robert Scheck 2017-10-12 12:20:14 UTC
Any chance to get this tiny patch into RHEL 7.5? :)

Comment 13 Remi Collet 2018-02-16 08:29:44 UTC
Added documentation for release notes, as worth to be mentioned there.

Comment 17 errata-xmlrpc 2018-04-10 16:15:25 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.