diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index ab06260..3fc0d76 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -2287,16 +2287,6 @@ function _drupal_exception_handler($exception) {
  * Sets up the script environment and loads settings.php.
  */
 function _drupal_bootstrap_configuration() {
-  // Set the Drupal custom error handler.
-  set_error_handler('_drupal_error_handler');
-  set_exception_handler('_drupal_exception_handler');
-
-  drupal_environment_initialize();
-  // Start a page timer:
-  timer_start('page');
-  // Initialize the configuration, including variables from settings.php.
-  drupal_settings_initialize();
-
   // Include and activate the class loader.
   $loader = drupal_classloader();
 
@@ -2315,6 +2305,16 @@ function _drupal_bootstrap_configuration() {
     // All Drupal-namespaced code in core lives in /core/lib/Drupal.
     'Drupal' => DRUPAL_ROOT . '/core/lib',
   ));
+
+  // Set the Drupal custom error handler.
+  set_error_handler('_drupal_error_handler');
+  set_exception_handler('_drupal_exception_handler');
+
+  drupal_environment_initialize();
+  // Start a page timer:
+  timer_start('page');
+  // Initialize the configuration, including variables from settings.php.
+  drupal_settings_initialize();
 }
 
 /**
