diff --git wp-includes/load.php wp-includes/load.php
index c70eeeb..8c80f65 100644
--- wp-includes/load.php
+++ wp-includes/load.php
@@ -39,8 +39,6 @@ function wp_unregister_GLOBALS() {
  * @since 3.0.0
  */
 function wp_fix_server_vars() {
-	global $PHP_SELF;
-
 	$default_server_values = array(
 		'SERVER_SOFTWARE' => '',
 		'REQUEST_URI' => '',
@@ -87,9 +85,8 @@ function wp_fix_server_vars() {
 		unset( $_SERVER['PATH_INFO'] );
 
 	// Fix empty PHP_SELF
-	$PHP_SELF = $_SERVER['PHP_SELF'];
-	if ( empty( $PHP_SELF ) )
-		$_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace( '/(\?.*)?$/', '', $_SERVER["REQUEST_URI"] );
+	if ( empty( $_SERVER['PHP_SELF'] ) )
+		$_SERVER['PHP_SELF'] = preg_replace( '/(\?.*)?$/', '', $_SERVER['REQUEST_URI'] );
 }
 
 /**
diff --git wp-includes/vars.php wp-includes/vars.php
index aca78f1..70dff6e 100644
--- wp-includes/vars.php
+++ wp-includes/vars.php
@@ -16,11 +16,11 @@
 if ( is_admin() ) {
 	// wp-admin pages are checked more carefully
 	if ( is_network_admin() )
-		preg_match('#/wp-admin/network/?(.*?)$#i', $PHP_SELF, $self_matches);
+		preg_match('#/wp-admin/network/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches);
 	elseif ( is_user_admin() )
-		preg_match('#/wp-admin/user/?(.*?)$#i', $PHP_SELF, $self_matches);
+		preg_match('#/wp-admin/user/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches);
 	else
-		preg_match('#/wp-admin/?(.*?)$#i', $PHP_SELF, $self_matches);
+		preg_match('#/wp-admin/?(.*?)$#i', $_SERVER['PHP_SELF'], $self_matches);
 	$pagenow = $self_matches[1];
 	$pagenow = trim($pagenow, '/');
 	$pagenow = preg_replace('#\?.*?$#', '', $pagenow);
@@ -33,7 +33,7 @@ if ( is_admin() ) {
 			$pagenow .= '.php'; // for Options +Multiviews: /wp-admin/themes/index.php (themes.php is queried)
 	}
 } else {
-	if ( preg_match('#([^/]+\.php)([?/].*?)?$#i', $PHP_SELF, $self_matches) )
+	if ( preg_match('#([^/]+\.php)([?/].*?)?$#i', $_SERVER['PHP_SELF'], $self_matches) )
 		$pagenow = strtolower($self_matches[1]);
 	else
 		$pagenow = 'index.php';
diff --git wp-settings.php wp-settings.php
index 6c5346f..7897e73 100644
--- wp-settings.php
+++ wp-settings.php
@@ -75,6 +75,7 @@ require( ABSPATH . WPINC . '/plugin.php' );
 require_wp_db();
 
 // Set the database table prefix and the format specifiers for database table columns.
+$GLOBALS['table_prefix'] = $table_prefix;
 wp_set_wpdb_vars();
 
 // Start the WordPress object cache, or an external object cache if the drop-in is present.
