MediaWiki master
Setup.php
Go to the documentation of this file.
1<?php
53// phpcs:disable MediaWiki.Usage.DeprecatedGlobalVariables
66use MediaWiki\MainConfigSchema;
82use Psr\Log\LoggerInterface;
84use Wikimedia\RequestTimeout\RequestTimeout;
87
95// This file must be included from a valid entry point (e.g. WebStart.php, Maintenance.php)
96if ( !defined( 'MEDIAWIKI' ) ) {
97 exit( 1 );
98}
99
100// The MW_ENTRY_POINT constant must always exists, to make it safe to access.
101// For compat, we do support older and custom MW entrypoints that don't set this,
102// in which case we assign a default here.
103if ( !defined( 'MW_ENTRY_POINT' ) ) {
109 define( 'MW_ENTRY_POINT', 'unknown' );
110}
111
112// The $IP variable is defined for use by LocalSettings.php.
113// It is made available as a global variable for backwards compatibility.
114//
115// Source code should use the MW_INSTALL_PATH constant instead.
116global $IP;
117$IP = wfDetectInstallPath(); // ensures MW_INSTALL_PATH is defined
118
124require_once MW_INSTALL_PATH . '/includes/AutoLoader.php';
125require_once MW_INSTALL_PATH . '/includes/Defines.php';
126
127// Assert that composer dependencies were successfully loaded
128if ( !interface_exists( LoggerInterface::class ) ) {
129 $message = (
130 '<strong>Error: Missing external libraries.</strong> ' .
131 'MediaWiki depends on external libraries bundled with most MediaWiki distributions. ' .
132 "When installing MediaWiki from its Git reposistory, these must be installed separately.\n\n" .
133 'Please see the <a href="https://www.mediawiki.org/wiki/Download_from_Git' .
134 '#Fetch_external_libraries">instructions for installing libraries</a> on mediawiki.org ' .
135 'for help on installing the required libraries.'
136 );
137 http_response_code( 500 );
138 echo $message;
139 error_log( $message );
140 exit( 1 );
141}
142
143// Deprecated global variable for backwards-compatibility.
144// New code should check MW_ENTRY_POINT directly.
146
153
155
156$wgSettings = SettingsBuilder::getInstance();
157
158if ( defined( 'MW_USE_CONFIG_SCHEMA_CLASS' ) ) {
159 // Load config schema from MainConfigSchema. Useful for running scripts that
160 // generate other representations of the config schema. This is slow, so it
161 // should not be used for serving web traffic.
162 $wgSettings->load( new ReflectionSchemaSource( MainConfigSchema::class ) );
163} else {
164 $wgSettings->load( new PhpSettingsSource( MW_INSTALL_PATH . '/includes/config-schema.php' ) );
165}
166
167require_once MW_INSTALL_PATH . '/includes/GlobalFunctions.php';
168
169// Install callback for normalizing headers.
170HeaderCallback::register();
171
172// Tell HttpStatus to use HeaderCallback for reporting warnings when
173// attempting to set headers after the headers have already been sent.
174HttpStatus::registerHeadersSentCallback(
175 [ HeaderCallback::class, 'warnIfHeadersSent' ]
176);
177
178// Set the encoding used by PHP for reading HTTP input, and writing output.
179// This is also the default for mbstring functions.
180mb_internal_encoding( 'UTF-8' );
181
186// Initialize some config settings with dynamic defaults, and
187// make default settings available in globals for use in LocalSettings.php.
188$wgSettings->putConfigValues( [
189 MainConfigNames::ExtensionDirectory => MW_INSTALL_PATH . '/extensions',
190 MainConfigNames::StyleDirectory => MW_INSTALL_PATH . '/skins',
191 MainConfigNames::UploadDirectory => MW_INSTALL_PATH . '/images',
192 MainConfigNames::ServiceWiringFiles => [ MW_INSTALL_PATH . '/includes/ServiceWiring.php' ],
193 'Version' => MW_VERSION,
194] );
195$wgSettings->apply();
196
197// $wgSettings->apply() puts all configuration into global variables.
198// If we are not in global scope, make all relevant globals available
199// in this file's scope as well.
200$wgScopeTest = 'MediaWiki Setup.php scope test';
201if ( !isset( $GLOBALS['wgScopeTest'] ) || $GLOBALS['wgScopeTest'] !== $wgScopeTest ) {
202 foreach ( $wgSettings->getConfigSchema()->getDefinedKeys() as $key ) {
203 $var = "wg$key";
204 // phpcs:ignore MediaWiki.NamingConventions.ValidGlobalName.allowedPrefix
205 global $$var;
206 }
207 unset( $key, $var );
208}
209unset( $wgScopeTest );
210
211try {
212 if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
213 call_user_func( MW_CONFIG_CALLBACK, $wgSettings );
214 } else {
215 wfDetectLocalSettingsFile( MW_INSTALL_PATH );
216
217 if ( getenv( 'MW_USE_LOCAL_SETTINGS_LOADER' ) ) {
218 // NOTE: This will not work for configuration variables that use a prefix
219 // other than "wg".
220 $localSettingsLoader = new LocalSettingsLoader( $wgSettings, MW_INSTALL_PATH );
221 $localSettingsLoader->loadLocalSettingsFile( MW_CONFIG_FILE );
222 unset( $localSettingsLoader );
223 } else {
224 if ( str_ends_with( MW_CONFIG_FILE, '.php' ) ) {
225 // make defaults available as globals
226 $wgSettings->apply();
227 require_once MW_CONFIG_FILE;
228 } else {
229 $wgSettings->loadFile( MW_CONFIG_FILE );
230 }
231 }
232 }
233
234 // Make settings loaded by LocalSettings.php available in globals for use here
235 $wgSettings->apply();
236} catch ( MissingExtensionException $e ) {
237 // Make a common mistake give a friendly error
238 $e->render();
239}
240
241// If in a wiki-farm, load site-specific settings
242if ( $wgSettings->getConfig()->get( MainConfigNames::WikiFarmSettingsDirectory ) ) {
243 $wikiFarmSettingsLoader = new WikiFarmSettingsLoader( $wgSettings );
244 $wikiFarmSettingsLoader->loadWikiFarmSettings();
245 unset( $wikiFarmSettingsLoader );
246}
247
248// All settings should be loaded now.
249$wgSettings->enterRegistrationStage();
250
258if ( defined( 'MW_SETUP_CALLBACK' ) ) {
259 call_user_func( MW_SETUP_CALLBACK, $wgSettings );
260 // Make any additional settings available in globals for use here
261 $wgSettings->apply();
262}
263
264// Apply dynamic defaults declared in config schema callbacks.
266$dynamicDefaults->applyDynamicDefaults( $wgSettings->getConfigBuilder() );
267
268// Make updated config available in global scope.
269$wgSettings->apply();
270
271// Apply dynamic defaults implemented in SetupDynamicConfig.php.
272// Ideally, all logic in SetupDynamicConfig would be converted to
273// callbacks in the config schema.
274require __DIR__ . '/SetupDynamicConfig.php';
275
276if ( defined( 'MW_AUTOLOAD_TEST_CLASSES' ) ) {
277 require_once __DIR__ . '/../tests/common/TestsAutoLoader.php';
278}
279
280// Start time limit
281if ( $wgRequestTimeLimit && MW_ENTRY_POINT !== 'cli' ) {
282 RequestTimeout::singleton()->setWallTimeLimit( $wgRequestTimeLimit );
283}
284
288if ( defined( 'MW_AUTOLOAD_TEST_CLASSES' ) ) {
289 ExtensionRegistry::getInstance()->setLoadTestClassesAndNamespaces( true );
290}
291
292ExtensionRegistry::getInstance()->setSettingsBuilder( $wgSettings );
293ExtensionRegistry::getInstance()->loadFromQueue();
294// Don't let any other extensions load
295ExtensionRegistry::getInstance()->finish();
296
302if ( defined( 'MW_FINAL_SETUP_CALLBACK' ) ) {
303 call_user_func( MW_FINAL_SETUP_CALLBACK, $wgSettings );
304 // Make any additional settings available in globals for use below
305 $wgSettings->apply();
306}
307
308// Config can no longer be changed.
309$wgSettings->enterReadOnlyStage();
310
311// Set an appropriate locale (T291234)
312// setlocale() will return the locale name actually set.
313// The putenv() is meant to propagate the choice of locale to shell commands
314// so that they will interpret UTF-8 correctly. If you have a problem with a
315// shell command and need to send a special locale, you can override the locale
316// with Command::environment().
317putenv( "LC_ALL=" . setlocale( LC_ALL, 'C.UTF-8', 'C' ) );
318
319// Set PHP runtime to the desired timezone
320date_default_timezone_set( $wgLocaltimezone );
321
322MWDebug::setup();
323
324// Enable the global service locator.
325// Trivial expansion of site configuration should go before this point.
326// Any non-trivial expansion that requires calling into MediaWikiServices or other parts of MW.
327MediaWikiServices::allowGlobalInstance();
328
329// Define a constant that indicates that the bootstrapping of the service locator
330// is complete.
331define( 'MW_SERVICE_BOOTSTRAP_COMPLETE', 1 );
332
333MWExceptionRenderer::setShowExceptionDetails( $wgShowExceptionDetails );
334if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
335 // Never install the handler in PHPUnit tests, otherwise PHPUnit's own handler will be unset and things
336 // like convertWarningsToExceptions won't work.
337 MWExceptionHandler::installHandler( $wgLogExceptionBacktrace, $wgPropagateErrors );
338}
340
341// Initialize the root span for distributed tracing if we're in a web request context (T340552).
342// Do this here since subsequent setup code, e.g. session initialization or post-setup hooks,
343// may themselves create spans, so the root span needs to have been initialized by then.
344call_user_func( static function (): void {
345 if ( wfIsCLI() ) {
346 return;
347 }
348
349 $tracer = MediaWikiServices::getInstance()->getTracer();
350 $request = RequestContext::getMain()->getRequest();
351 // Backdate the start of the root span to the timestamp where PHP actually started working on this operation.
352 $startTimeNanos = (int)( 1e9 * $_SERVER['REQUEST_TIME_FLOAT'] );
353 // Avoid high cardinality URL path as root span name, instead safely use the HTTP method.
354 // Per OTEL Semantic Conventions, https://opentelemetry.io/docs/specs/semconv/http/http-spans/
355 $spanName = "EntryPoint " . MW_ENTRY_POINT . ".php HTTP {$request->getMethod()}";
357 $rootSpan = $tracer->createRootSpanFromCarrier( $spanName, $wgAllowExternalReqID ? $request->getAllHeaders() : [] );
358 $rootSpan->setSpanKind( SpanInterface::SPAN_KIND_SERVER )
359 ->setAttributes( array_filter( [
360 'http.request.method' => $request->getMethod(),
361 'url.path' => $request->getRequestURL(),
362 'server.name' => $_SERVER['SERVER_NAME'] ?? null,
363 ] ) )
364 ->start( $startTimeNanos );
365 $rootSpan->activate();
366
367 TracerState::getInstance()->setRootSpan( $rootSpan );
368} );
369
370// Non-trivial validation of: $wgServer
371// The FatalError page only renders cleanly after MWExceptionHandler is installed.
372if ( $wgServer === false ) {
373 // T30798: $wgServer must be explicitly set
374 throw new FatalError(
375 '$wgServer must be set in LocalSettings.php. ' .
376 'See <a href="https://www.mediawiki.org/wiki/Manual:$wgServer">' .
377 'https://www.mediawiki.org/wiki/Manual:$wgServer</a>.'
378 );
379}
380
381// Non-trivial expansion of: $wgCanonicalServer, $wgServerName.
382// These require calling global functions.
383// Also here are other settings that further depend on these two.
384if ( $wgCanonicalServer === false ) {
385 $wgCanonicalServer = MediaWikiServices::getInstance()->getUrlUtils()->getCanonicalServer();
386}
388
389if ( $wgServerName !== false ) {
390 wfWarn( '$wgServerName should be derived from $wgCanonicalServer, '
391 . 'not customized. Overwriting $wgServerName.' );
392}
393$wgServerName = parse_url( $wgCanonicalServer, PHP_URL_HOST );
394
395// $wgEmergencyContact and $wgPasswordSender may be false or empty string (T104142)
396if ( !$wgEmergencyContact ) {
397 $wgEmergencyContact = 'wikiadmin@' . $wgServerName;
398}
399if ( !$wgPasswordSender ) {
400 $wgPasswordSender = 'apache@' . $wgServerName;
401}
402if ( !$wgNoReplyAddress ) {
404}
405
406// Non-trivial expansion of: $wgSecureLogin
407// (due to calling wfWarn).
408if ( $wgSecureLogin && !str_starts_with( $wgServer, '//' ) ) {
409 $wgSecureLogin = false;
410 wfWarn( 'Secure login was enabled on a server that only supports '
411 . 'HTTP or HTTPS. Disabling secure login.' );
412}
413
414// Now that GlobalFunctions is loaded, set defaults that depend on it.
415if ( $wgTmpDirectory === false ) {
417}
418
420 // Apply $wgSharedDB table aliases for the local LB (all non-foreign DB connections)
421 MediaWikiServices::getInstance()->getDBLoadBalancer()->setTableAliases(
422 array_fill_keys(
424 [
425 'dbname' => $wgSharedDB,
426 'schema' => $wgSharedSchema,
427 'prefix' => $wgSharedPrefix
428 ]
429 )
430 );
431}
432
433// Raise the memory limit if it's too low
434// NOTE: This use wfDebug, and must remain after the MWDebug::setup() call.
436
437// Explicit globals, so this works with bootstrap.php
439
440// Initialize the request object in $wgRequest
441$wgRequest = RequestContext::getMain()->getRequest(); // BackCompat
442
443// Make sure that object caching does not undermine the ChronologyProtector improvements
444if ( $wgRequest->getCookie( 'UseDC', '' ) === 'master' ) {
445 // The user is pinned to the primary DC, meaning that they made recent changes which should
446 // be reflected in their subsequent web requests. Avoid the use of interim cache keys because
447 // they use a blind TTL and could be stale if an object changes twice in a short time span.
448 MediaWikiServices::getInstance()->getMainWANObjectCache()->useInterimHoldOffCaching( false );
449}
450
451// Useful debug output
452( static function () {
453 global $wgRequest;
454
455 $logger = LoggerFactory::getInstance( 'wfDebug' );
456 if ( MW_ENTRY_POINT === 'cli' ) {
457 $self = $_SERVER['PHP_SELF'] ?? '';
458 $logger->debug( "\n\nStart command line script $self" );
459 } else {
460 $debug = "\n\nStart request {$wgRequest->getMethod()} {$wgRequest->getRequestURL()}\n";
461 $debug .= "IP: " . $wgRequest->getIP() . "\n";
462 $debug .= "HTTP HEADERS:\n";
463 foreach ( $wgRequest->getAllHeaders() as $name => $value ) {
464 $debug .= "$name: $value\n";
465 }
466 $debug .= "(end headers)";
467 $logger->debug( $debug );
468 }
469} )();
470
471// Most of the config is out, some might want to run hooks here.
472( new HookRunner( MediaWikiServices::getInstance()->getHookContainer() ) )->onSetupAfterCache();
473
474// Now that variant lists may be available, parse any action paths and article paths
475// as query parameters.
476//
477// Skip title interpolation on API queries where it is useless and sometimes harmful (T18019).
478//
479// Optimization: Skip on load.php and all other entrypoints besides index.php to save time.
480//
481// TODO: Figure out if this can be safely done after everything else in Setup.php (e.g. any
482// hooks or other state that would miss this?). If so, move to wfIndexMain or MediaWiki::run.
483if ( MW_ENTRY_POINT === 'index' ) {
484 $wgRequest->interpolateTitle();
485}
486
491if ( !defined( 'MW_NO_SESSION' ) && MW_ENTRY_POINT !== 'cli' ) {
492 // If session.auto_start is there, we can't touch session name
493 if ( $wgPHPSessionHandling !== 'disable' && !wfIniGetBool( 'session.auto_start' ) ) {
494 HeaderCallback::warnIfHeadersSent();
495 session_name( $wgSessionName ?: $wgCookiePrefix . '_session' );
496 }
497
498 // Create the SessionManager singleton and set up our session handler,
499 // unless we're specifically asked not to.
500 if ( !defined( 'MW_NO_SESSION_HANDLER' ) ) {
501 MediaWiki\Session\PHPSessionHandler::install(
502 MediaWiki\Session\SessionManager::singleton()
503 );
504 }
505
506 $contLang = MediaWikiServices::getInstance()->getContentLanguage();
507
508 // Initialize the session
509 try {
510 $session = MediaWiki\Session\SessionManager::getGlobalSession();
511 } catch ( MediaWiki\Session\SessionOverflowException $ex ) {
512 // The exception is because the request had multiple possible
513 // sessions tied for top priority. Report this to the user.
514 $list = [];
515 foreach ( $ex->getSessionInfos() as $info ) {
516 $list[] = $info->getProvider()->describe( $contLang );
517 }
518 $list = $contLang->listToText( $list );
519 throw new HttpError( 400,
520 Message::newFromKey( 'sessionmanager-tie', $list )->inLanguage( $contLang )
521 );
522 }
523
524 unset( $contLang );
525
526 if ( $session->isPersistent() ) {
527 $wgInitialSessionId = $session->getSessionId();
528 }
529
530 $session->renew();
531 if ( MediaWiki\Session\PHPSessionHandler::isEnabled() &&
532 ( $session->isPersistent() || $session->shouldRememberUser() ) &&
533 session_id() !== $session->getId()
534 ) {
535 // Start the PHP-session for backwards compatibility
536 if ( session_id() !== '' ) {
537 wfDebugLog( 'session', 'PHP session {old_id} was already started, changing to {new_id}', 'all', [
538 'old_id' => session_id(),
539 'new_id' => $session->getId(),
540 ] );
541 session_write_close();
542 }
543 session_id( $session->getId() );
544 session_start();
545 }
546
547 unset( $session );
548} else {
549 // Even if we didn't set up a global Session, still install our session
550 // handler unless specifically requested not to.
551 if ( !defined( 'MW_NO_SESSION_HANDLER' ) ) {
552 MediaWiki\Session\PHPSessionHandler::install(
553 MediaWiki\Session\SessionManager::singleton()
554 );
555 }
556}
557
558// Explicit globals, so this works with bootstrap.php
560
566$wgUser = new StubGlobalUser( RequestContext::getMain()->getUser() ); // BackCompat
567register_shutdown_function( static function () {
568 StubGlobalUser::$destructorDeprecationDisarmed = true;
569} );
570
575
579$wgOut = RequestContext::getMain()->getOutput(); // BackCompat
580
584$wgTitle = null;
585
586// Explicit globals, so this works with bootstrap.php
588
589// Extension setup functions
590// Entries should be added to this variable during the inclusion
591// of the extension file. This allows the extension to perform
592// any necessary initialisation in the fully initialised environment
593foreach ( $wgExtensionFunctions as $func ) {
594 $func();
595}
596unset( $func ); // no global pollution; destroy reference
597
598// If the session user has a 0 id but a valid name, that means we need to
599// autocreate it.
600if ( !defined( 'MW_NO_SESSION' ) && MW_ENTRY_POINT !== 'cli' ) {
601 $sessionUser = MediaWiki\Session\SessionManager::getGlobalSession()->getUser();
602 if ( $sessionUser->getId() === 0 &&
603 MediaWikiServices::getInstance()->getUserNameUtils()->isValid( $sessionUser->getName() )
604 ) {
605 MediaWikiServices::getInstance()->getAuthManager()->autoCreateUser(
606 $sessionUser,
607 MediaWiki\Auth\AuthManager::AUTOCREATE_SOURCE_SESSION,
608 true,
609 true,
610 $sessionUser
611 );
612 }
613 unset( $sessionUser );
614}
615
616// Optimization: Avoid overhead from DeferredUpdates and Pingback deps when turned off.
617if ( MW_ENTRY_POINT !== 'cli' && $wgPingback ) {
618 // NOTE: Do not refactor to inject Config or otherwise make unconditional service call.
619 //
620 // On a plain install of MediaWiki, Pingback is likely the *only* feature
621 // involving DeferredUpdates or DB_PRIMARY on a regular page view.
622 // To allow for error recovery and fault isolation, let admins turn this
623 // off completely. (T269516)
624 DeferredUpdates::addCallableUpdate( static function () {
625 MediaWikiServices::getInstance()->getPingback()->run();
626 } );
627}
628
630if ( $settingsWarnings ) {
631 $logger = LoggerFactory::getInstance( 'Settings' );
632 foreach ( $settingsWarnings as $msg ) {
633 $logger->warning( $msg );
634 }
635 unset( $logger );
636}
637
638unset( $settingsWarnings );
639
640// Explicit globals, so this works with bootstrap.php
643
644// T264370
645if ( !defined( 'MW_NO_SESSION' ) && MW_ENTRY_POINT !== 'cli' ) {
646 MediaWiki\Session\SessionManager::singleton()->logPotentialSessionLeakage();
647}
wfDetectLocalSettingsFile(?string $installationPath=null)
Decide and remember where to load LocalSettings from.
wfDetectInstallPath()
Decide and remember where mediawiki is installed.
wfIsCLI()
Check if we are running from the commandline.
const MW_VERSION
The running version of MediaWiki.
Definition Defines.php:37
wfTempDir()
Tries to get the system directory for temporary files.
wfWarn( $msg, $callerOffset=1, $level=E_USER_NOTICE)
Send a warning either to the debug log or in a PHP error depending on $wgDevelopmentWarnings.
wfMemoryLimit( $newLimit)
Raise PHP's memory limit (if needed).
wfIniGetBool( $setting)
Safety wrapper around ini_get() for boolean settings.
wfDebugLog( $logGroup, $text, $dest='all', array $context=[])
Send a line to a supplementary debug log file, if configured, or main debug log if not.
if(!defined('MEDIAWIKI')) if(!defined( 'MW_ENTRY_POINT')) global $IP
Environment checks.
Definition Setup.php:103
global $wgRequest
Definition Setup.php:438
if(defined( 'MW_SETUP_CALLBACK')) $dynamicDefaults
Customization point after most things are loaded (constants, functions, classes, LocalSettings.
Definition Setup.php:265
if(!defined('MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli') if(MW_ENTRY_POINT !=='cli' && $wgPingback $settingsWarnings)
Definition Setup.php:629
$wgUser
Definition Setup.php:566
$wgAutoloadClasses
Definition Setup.php:154
global $wgInitialSessionId
Definition Setup.php:438
if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli' $wgLang
Definition Setup.php:559
if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli' $wgOut
Definition Setup.php:559
$wgConf
$wgConf hold the site configuration.
Definition Setup.php:152
if( $wgServerName !==false) $wgServerName
Definition Setup.php:393
if(!interface_exists(LoggerInterface::class)) $wgCommandLineMode
Pre-config setup: Before loading LocalSettings.php.
Definition Setup.php:145
if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli' $wgTitle
Definition Setup.php:559
$wgScopeTest
Definition Setup.php:200
if($wgServer===false) if( $wgCanonicalServer===false) $wgVirtualRestConfig['global']['domain']
Definition Setup.php:387
global $wgFullyInitialised
Definition Setup.php:587
global $wgExtensionFunctions
Definition Setup.php:587
$wgSettings
Definition Setup.php:156
if(!defined('MW_SETUP_CALLBACK'))
Definition WebStart.php:82
const MW_ENTRY_POINT
Definition api.php:35
Configuration holder, particularly for multi-wiki sites.
Group all the pieces relevant to the context of a request into one instance.
Debug toolbar.
Definition MWDebug.php:49
Defer callable updates to run later in the PHP process.
Abort the web request with a custom HTML string that will represent the entire response.
Show an error that looks like an HTTP server error.
Definition HttpError.php:36
Handler class for MWExceptions.
Class to expose exceptions to the client (API bots, users, admins using CLI scripts)
This class provides an implementation of the core hook interfaces, forwarding hook calls to HookConta...
Base class for language-specific code.
Definition Language.php:81
Create PSR-3 logger objects.
A class containing constants representing the names of configuration variables.
Service locator for MediaWiki core services.
The Message class deals with fetching and processing of interface message into a variety of formats.
Definition Message.php:157
Load JSON files, and uses a Processor to extract information.
Thrown when ExtensionRegistry cannot open the extension.json or skin.json file.
Utility for loading LocalSettings files.
Builder class for constructing a Config object from a set of sources during bootstrap.
Settings loaded from a PHP file path as an array structure.
Constructs a settings array based on a PHP class by inspecting class members to construct a schema.
Utility for loading site-specific settings in a multi-tenancy ("wiki farm" or "wiki family") environm...
Stub object for the global user ($wgUser) that makes it possible to change the relevant underlying ob...
Stub object for the user language.
Represents a title within MediaWiki.
Definition Title.php:78
User class for the MediaWiki software.
Definition User.php:123
static init(array $profilerConf)
Definition Profiler.php:68
Holds shared telemetry state, such as finished span data buffered for export.
$wgMemoryLimit
Config variable stub for the MemoryLimit setting, for use by phpdoc and IDEs.
$wgEmergencyContact
Config variable stub for the EmergencyContact setting, for use by phpdoc and IDEs.
$wgSharedTables
Config variable stub for the SharedTables setting, for use by phpdoc and IDEs.
$wgSessionName
Config variable stub for the SessionName setting, for use by phpdoc and IDEs.
$wgLogExceptionBacktrace
Config variable stub for the LogExceptionBacktrace setting, for use by phpdoc and IDEs.
$wgTmpDirectory
Config variable stub for the TmpDirectory setting, for use by phpdoc and IDEs.
$wgNoReplyAddress
Config variable stub for the NoReplyAddress setting, for use by phpdoc and IDEs.
$wgProfiler
Config variable stub for the Profiler setting, for use by phpdoc and IDEs.
$wgSecureLogin
Config variable stub for the SecureLogin setting, for use by phpdoc and IDEs.
$wgLocaltimezone
Config variable stub for the Localtimezone setting, for use by phpdoc and IDEs.
$wgShowExceptionDetails
Config variable stub for the ShowExceptionDetails setting, for use by phpdoc and IDEs.
$wgAllowExternalReqID
Config variable stub for the AllowExternalReqID setting, for use by phpdoc and IDEs.
$wgRequestTimeLimit
Config variable stub for the RequestTimeLimit setting, for use by phpdoc and IDEs.
$wgSharedDB
Config variable stub for the SharedDB setting, for use by phpdoc and IDEs.
$wgCanonicalServer
Config variable stub for the CanonicalServer setting, for use by phpdoc and IDEs.
$wgServer
Config variable stub for the Server setting, for use by phpdoc and IDEs.
$wgPropagateErrors
Config variable stub for the PropagateErrors setting, for use by phpdoc and IDEs.
$wgSharedSchema
Config variable stub for the SharedSchema setting, for use by phpdoc and IDEs.
$wgPasswordSender
Config variable stub for the PasswordSender setting, for use by phpdoc and IDEs.
$wgPingback
Config variable stub for the Pingback setting, for use by phpdoc and IDEs.
$wgCookiePrefix
Config variable stub for the CookiePrefix setting, for use by phpdoc and IDEs.
$wgSharedPrefix
Config variable stub for the SharedPrefix setting, for use by phpdoc and IDEs.
$wgPHPSessionHandling
Config variable stub for the PHPSessionHandling setting, for use by phpdoc and IDEs.
const MW_CONFIG_CALLBACK
Definition install.php:34
Represents an OpenTelemetry span, i.e.
A helper class for throttling authentication attempts.