// Start the autoloader, so that extensions can derive classes from core files
require_once "$IP/includes/AutoLoader.php";
-// Load up some global defines
+// Load global constants
require_once "$IP/includes/Defines.php";
// Load default settings
die( 1 );
}
+/**
+ * Changes to the PHP environment that don't vary on configuration.
+ */
+
// Install a header callback
MediaWiki\HeaderCallback::register();
+// Set the encoding used by reading HTTP input, writing HTTP output.
+// This is also the default for mbstring functions.
+mb_internal_encoding( 'UTF-8' );
+
/**
* Load LocalSettings.php
*/
// Don't let any other extensions load
ExtensionRegistry::getInstance()->finish();
-mb_internal_encoding( 'UTF-8' );
-
// Set the configured locale on all requests for consisteny
putenv( "LC_ALL=$wgShellLocale" );
setlocale( LC_ALL, $wgShellLocale );
$wgDebugToolbar = false;
}
-// We always output HTML5 since 1.22, overriding these is no longer supported
-// we set them here for extensions that depend on its value.
-$wgHtml5 = true;
-$wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml';
-$wgJsMimeType = 'text/javascript';
-
// Blacklisted file extensions shouldn't appear on the "allowed" list
$wgFileExtensions = array_values( array_diff( $wgFileExtensions, $wgFileBlacklist ) );
$ps_misc = Profiler::instance()->scopedProfileIn( $fname . '-misc' );
// Raise the memory limit if it's too low
-wfMemoryLimit();
+// Note, this makes use of wfDebug, and thus should not be before
+// MWDebug::init() is called.
+wfMemoryLimit( $wgMemoryLimit );
/**
* Set up the timezone, suppressing the pseudo-security warning in PHP 5.1+
}
} else {
$debug = "\n\nStart request {$wgRequest->getMethod()} {$wgRequest->getRequestURL()}\n";
-
- if ( $wgDebugPrintHttpHeaders ) {
- $debug .= "HTTP HEADERS:\n";
-
- foreach ( $wgRequest->getAllHeaders() as $name => $value ) {
- $debug .= "$name: $value\n";
- }
+ $debug .= "HTTP HEADERS:\n";
+ foreach ( $wgRequest->getAllHeaders() as $name => $value ) {
+ $debug .= "$name: $value\n";
}
wfDebug( $debug );
}