From f9d9c4a6aa35036e7470ada9c547778c2faea28e Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 31 Aug 2006 13:11:58 +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 7acbd23c07..dfe04c82d7 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -472,6 +472,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; @@ -490,8 +494,6 @@ void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC) } PG(magic_quotes_gpc) = magic_quotes_gpc; } - /* call php's original import as a catch-all */ - php_php_import_environment_variables(array_ptr TSRMLS_CC); } #endif -- 2.50.1