diff --git a/phpBB/phpbb/install/helper/container_factory.php b/phpBB/phpbb/install/helper/container_factory.php
index 655760270a..077a4fabe5 100644
--- a/phpBB/phpbb/install/helper/container_factory.php
+++ b/phpBB/phpbb/install/helper/container_factory.php
@@ -184,8 +184,8 @@ class container_factory
 		// Get compatibility globals and constants
 		$this->update_helper->include_file('includes/compatibility_globals.' . $this->php_ext);
 
-		register_compatibility_globals();
-
 		$this->update_helper->include_file('includes/constants.' . $this->php_ext);
+
+		register_compatibility_globals();
 	}
 }