Index: design/standard/templates/setup/tests/variables_order_error.tpl
===================================================================
--- design/standard/templates/setup/tests/variables_order_error.tpl	(revision 24607)
+++ design/standard/templates/setup/tests/variables_order_error.tpl	(working copy)
@@ -2,6 +2,7 @@
 <h3>{$result_number}. {"PHP does not register environment variables"|i18n("design/standard/setup/tests")}</h3>
 <p>
 {"PHP is currently not configured to register enviroment variables in the global variable $_ENV."|i18n("design/standard/setup/tests")}
+{"Since some extensions might use $_ENV it is recomended to fiox it unless you have full controll over all extensions you use!"|i18n("design/standard/setup/tests")}
 </p>
 <p>
 {"To fix this, edit your php.ini configuration and add E to the variables_order setting."|i18n("design/standard/setup/tests")}
Index: kernel/setup/ezsetuptests.php
===================================================================
--- kernel/setup/ezsetuptests.php	(revision 24591)
+++ kernel/setup/ezsetuptests.php	(working copy)
@@ -183,26 +183,26 @@
         {
             // Windows machines use the TEMP and TMP env variable.
             // TEMP is checked first.
-            $uploadDir = isset( $_ENV['TEMP'] ) ? $_ENV['TEMP'] : '';
-            if ( strlen( $uploadDir ) == 0 )
+            $uploadDir = eZSys::hasEnvironmentVariable( 'TEMP' ) ? eZSys::environmentVariable( 'TEMP' ) : '';
+            if ( $uploadDir === '' )
             {
-                $uploadDir = isset( $_ENV['TMP'] ) ? $_ENV['TMP'] : '';
+                $uploadDir = eZSys::hasEnvironmentVariable( 'TMP' ) ? eZSys::environmentVariable( 'TMP' ) : '';
             }
             // When TEMP/TMP is not set we have to guess the directory
             // The only valid guess is %SYSTEMROOT%/TEMP
             // If %SYSTEMROOT% is missing we keep the string empty
-            if ( strlen( $uploadDir ) == 0 )
+            if ( $uploadDir === '' )
             {
-                if ( isset( $_ENV['SYSTEMROOT'] ) )
+                if ( eZSys::hasEnvironmentVariable( 'SYSTEMROOT' ) )
                 {
-                    $uploadDir = $_ENV['SYSTEMROOT'] . '/TEMP';
+                    $uploadDir = eZSys::environmentVariable( 'SYSTEMROOT' ) . '/TEMP';
                 }
             }
         }
         else if ( $osType == 'unix' or
                   $osType == 'mac' )
         {
-            $uploadDir = isset( $_ENV['TMPDIR'] ) ? $_ENV['TMPDIR'] : '';
+            $uploadDir = eZSys::hasEnvironmentVariable( 'TMPDIR' ) ? eZSys::environmentVariable( 'TMPDIR' ) : '';
             // When TMPDIR is not set we have to guess the directory
             // On Unix systems we expect /tmp to be used
             if ( strlen( $uploadDir ) == 0 )
Index: lib/ezutils/classes/ezsys.php
===================================================================
--- lib/ezutils/classes/ezsys.php	(revision 24591)
+++ lib/ezutils/classes/ezsys.php	(working copy)
@@ -723,22 +723,29 @@
     }
 
     /*!
-     \return the variable named \a $variableName in the global \c $_ENV variable.
+     \return the variable named \a $variableName in the global \c ENV variable.
              If the variable is not present an error is shown and \c null is returned.
     */
     static function &environmentVariable( $variableName, $quiet = false )
     {
-        $_ENV;
-        if ( !isset( $_ENV[$variableName] ) )
+        if ( getenv($variableName) === false )
         {
             if ( !$quiet )
             {
                 eZDebug::writeError( "Environment variable '$variableName' does not exist", 'eZSys::environmentVariable' );
             }
-            $retValue = null;
-            return $retValue;
+            return null;
         }
-        return $_ENV[$variableName];
+        return getenv($variableName);
+    }
+
+    /*!
+     \return the true if variable named \a $variableName exists.
+             If the variable is not present false is returned.
+    */
+    static function hasEnvironmentVariable( $variableName )
+    {
+        return getenv($variableName) !== false;
     }
 
     /*!
@@ -747,8 +754,7 @@
     */
     static function setEnvironmentVariable( $variableName, $variableValue )
     {
-        $_ENV;
-        $_ENV[$variableName] = $variableValue;
+        putenv( "$variableName=$variableValue" );
     }
 
     function attributes()
Index: settings/site.ini
===================================================================
--- settings/site.ini	(revision 24591)
+++ settings/site.ini	(working copy)
@@ -726,8 +726,8 @@
 # The pagelayout to use for first time setups
 PageLayout=setup_pagelayout.tpl
 # List of tests to be run, critical tests must pass for the setup to continue
-CriticalTests=variables_order;directory_permissions;phpversion;database_extensions;image_conversion;safe_mode;memory_limit;execution_time;magic_quotes_runtime;allow_url_fopen;accept_path_info;php_session;file_upload;zlib_extension;dom_extension;iconv_extension;mbstring_extension;timezone;ezcversion
-OptionalTests=php_magicquotes;curl_extension;imagegd_extension;imagemagick_program;database_all_extensions;php_register_globals;texttoimage_functions;open_basedir
+CriticalTests=directory_permissions;phpversion;database_extensions;image_conversion;safe_mode;memory_limit;execution_time;magic_quotes_runtime;allow_url_fopen;accept_path_info;php_session;file_upload;zlib_extension;dom_extension;iconv_extension;mbstring_extension;timezone;ezcversion
+OptionalTests=variables_order;php_magicquotes;curl_extension;imagegd_extension;imagemagick_program;database_all_extensions;php_register_globals;texttoimage_functions;open_basedir
 OverrideSiteDesign=standard
 
 [RegionalSettings]
