|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #76798 Can't configure PHP-FPM via environment variables
Submitted: 2018-08-26 21:40 UTC Modified: 2020-07-25 16:47 UTC
Avg. Score:4.8 ± 0.4
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:3 (100.0%)
From: walterdolce at gmail dot com Assigned:
Status: Open Package: FPM related
PHP Version: 7.2.9 OS: All
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: walterdolce at gmail dot com
New email:
PHP Version: OS:


 [2018-08-26 21:40 UTC] walterdolce at gmail dot com
The php.ini file supports configuring PHP this way:
error_log = ${PHP_INI_ERROR_LOG}

This is perfect when it comes to using Docker. And it's also a recommended practice according to the 12factor app methodology (

One would expect to be able to do the same with PHP-FPM. But that doesn't seem to be the case with the following:
clear_env = env[PHP_FPM_CLEAR_ENV]

Why? Why is this not possible?

Please note the following does not work either:
clear_env = $PHP_FPM_CLEAR_ENV

If "FPM uses php.ini syntax for its configuration file" (as the docs say on page, then behaviour and capabilities should also be the same, IMO.

Interestingly, as reported by various people online and the docs, it IS possible to SET environment variables. Yet GETTING environment variables is not. But it shouldn't be the case.


Expected result:
PHP-FPM should be configurable via environment variables.

Actual result:
PHP-FPM can't be configured via environment variables.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-07-25 16:47 UTC]
-Type: Bug +Type: Feature/Change Request
 [2023-08-23 05:47 UTC] nhietmienhbao06 at gmail dot com
I hope you find your answer and also share with us if you find thanks for sharing with us. (
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 28 03:01:28 2024 UTC