Bug #75994 [Com]: Environment permanently breaks for worker process.

From: Date: Thu, 22 Feb 2018 14:11:29 +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-214067@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: sam at mousa dot nl 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: 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. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#214067) next »