From: Dmitry Stogov Date: Thu, 31 Aug 2006 13:11:58 +0000 (+0000) Subject: FastCGI environment variables must not be overriden by system environment variables X-Git-Tag: php-5.2.0RC3~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9d9c4a6aa35036e7470ada9c547778c2faea28e;p=php FastCGI environment variables must not be overriden by system environment variables --- 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