Bug #75994 [Com]: Environment permanently breaks for worker process.
| From: | d dot schniepp at semlabs dot de | Date: | Mon, 12 Mar 2018 15:26:03 +0000 |
| Subject: | Bug #75994 [Com]: Environment permanently breaks for worker process. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-214304@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75994&edit=1
ID: 75994
Comment by: d dot schniepp at semlabs dot de
Reported by: sam at mousa dot nl
Summary: Environment permanently breaks for worker process.
Status: Open
Type: Bug
Package: FPM related
Operating System: Alpine
PHP Version: 7.1.14
Block user comment: N
Private report: N
New Comment:
We can confirm this issue. It appeared on our docker based env since 7.1.15 and 7.2.1. We are using
the php:7.2-fpm-alpine docker image on multi-docker aws elastic beanstalk infant of an nginx. For
now we pinned our image to 7.1.13.
Previous Comments:
------------------------------------------------------------------------
[2018-02-23 03:50:17] laruence@php.net
I can not reproduce this... :<
------------------------------------------------------------------------
[2018-02-22 14:11:27] sam at mousa dot nl
After some more research this does not seem related to the usage of a reference.
Instead the following code will also break the environment:
putenv('testcase=12345');
It won't break if the env[testcase] entry is removed from the fpm config.
------------------------------------------------------------------------
[2018-02-22 13:49:22] sam at mousa dot nl
Description:
------------
# Test setup
pm = static
pm.max_children = 1
env[testcase] = test
Refresh the page below several times...
Based on the assumption that the environment is never changed
Test script:
---------------
<?php
if ($_SERVER['testcase'] === 'test') {
echo 'Everything is fine; trying to break your env...';
foreach($_SERVER as $key => &$value) {
putenv("$key=$value");
}
} else {
phpinfo(INFO_ENVIRONMENT);
}
die();
Expected result:
----------------
The test script above should consistently output:
Everything is fine; trying to break your env...
Actual result:
--------------
After a few refreshes it shows the environment part of phpinfo().
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75994&edit=1