From 016b63d91734843867cba6bd59c2ca8faa848b3e Mon Sep 17 00:00:00 2001 From: Alliballibaba Date: Thu, 4 Dec 2025 22:58:07 +0100 Subject: [PATCH] Adds clarification. --- frankenphp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frankenphp.c b/frankenphp.c index 507bc7ae..e12fed4e 100644 --- a/frankenphp.c +++ b/frankenphp.c @@ -838,8 +838,9 @@ static inline void register_server_variable_filtered(const char *key, static void frankenphp_register_variables(zval *track_vars_array) { /* https://www.php.net/manual/en/reserved.variables.server.php */ - /* In CGI mode, we consider the environment to be a part of the server - * variables. + /* In CGI mode, the environment is part of the $_SERVER variables. + * $_SERVER and $_ENV should only contain values from the original + * environment, not values added though putenv */ zend_hash_copy(Z_ARR_P(track_vars_array), main_thread_env, NULL);