From b94fb5e09c70eacf07cd0069f0e5ac22a217fc96 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 31 Aug 2006 13:12:18 +0000 Subject: [PATCH] FastCGI environment variables must not be overriden by system environment variables --- sapi/cgi/cgi_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 723c0886eb..dc31e9729c 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -451,6 +451,10 @@ void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC) zval_copy_ctor(array_ptr); return; } + + /* call php's original import as a catch-all */ + php_php_import_environment_variables(array_ptr TSRMLS_CC); + if (fcgi_is_fastcgi()) { fcgi_request *request = (fcgi_request*) SG(server_context); HashPosition pos; @@ -466,8 +470,6 @@ void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC) php_register_variable(var.s, *val, array_ptr TSRMLS_CC); } } - /* call php's original import as a catch-all */ - php_php_import_environment_variables(array_ptr TSRMLS_CC); } static void sapi_cgi_register_variables(zval *track_vars_array TSRMLS_DC) -- 2.50.1