|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2018-02-22 13:49 UTC] 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().
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 04:00:01 2025 UTC |
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.