Bug 1410010

Summary: Backport PHP-FPM's clear_env option from 5.4.27 to 5.4.16
Product: Red Hat Enterprise Linux 7 Reporter: Robert Scheck <redhat-bugzilla>
Component: phpAssignee: Remi Collet <rcollet>
Status: CLOSED ERRATA QA Contact: David Jež <djez>
Severity: medium Docs Contact: Lenka Špačková <lkuprova>
Priority: medium    
Version: 7.3CC: djez, jkejda, jorton, rcollet, robert.scheck
Target Milestone: rcKeywords: EasyFix, Patch
Target Release: 7.4   
Hardware: All   
OS: Linux   
Whiteboard:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 16:15:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1420851, 1465904, 1466370    
Attachments:
Description Flags
php-5.4.16-fpm-clear_env.patch none

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):
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.

Comment 1 Robert Scheck 2017-01-04 08:14:17 UTC
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.

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.

https://access.redhat.com/errata/RHBA-2018:0889