Go to the documentation of this file.
118 'envCheckRegisterGlobals',
120 'envCheckMagicQuotes',
121 'envCheckMagicSybase',
128 'envCheckModSecurity',
135 'envCheckShellLocale',
136 'envCheckUploadsDirectory',
138 'envCheckSuhosinMaxValueLength',
162 'wgEmailAuthentication',
165 'wgImageMagickConvertCommand',
171 'wgDeletedDirectory',
175 'wgUseInstantCommons',
178 'wgResourceLoaderMaxQueryLength',
190 '_Environment' =>
false,
191 '_SafeMode' =>
false,
192 '_RaiseMemory' =>
false,
193 '_UpgradeDone' =>
false,
194 '_InstallDone' =>
false,
195 '_Caches' =>
array(),
196 '_InstallPassword' =>
'',
197 '_SameAccount' =>
true,
198 '_CreateDBAccount' =>
false,
199 '_NamespaceType' =>
'site-name',
201 '_AdminPassword' =>
'',
202 '_AdminPassword2' =>
'',
204 '_Subscribe' =>
false,
205 '_SkipOptional' =>
'continue',
206 '_RightsProfile' =>
'wiki',
207 '_LicenseCode' =>
'none',
209 '_Extensions' =>
array(),
210 '_MemCachedServers' =>
'',
211 '_UpgradeKeySupplied' =>
false,
212 '_ExistingDBSettings' =>
false,
216 'wgLogo' =>
'$wgStylePath/common/images/wiki.png',
239 'xcache' =>
'xcache_get',
240 'apc' =>
'apc_fetch',
241 'wincache' =>
'wincache_ucache_get'
252 '*' =>
array(
'edit' =>
false )
256 'createaccount' =>
false,
262 'createaccount' =>
false,
276 'url' =>
'http://creativecommons.org/licenses/by/3.0/',
277 'icon' =>
'{$wgStylePath}/common/images/cc-by.png',
280 'url' =>
'http://creativecommons.org/licenses/by-sa/3.0/',
281 'icon' =>
'{$wgStylePath}/common/images/cc-by-sa.png',
283 'cc-by-nc-sa' =>
array(
284 'url' =>
'http://creativecommons.org/licenses/by-nc-sa/3.0/',
285 'icon' =>
'{$wgStylePath}/common/images/cc-by-nc-sa.png',
288 'url' =>
'https://creativecommons.org/publicdomain/zero/1.0/',
289 'icon' =>
'{$wgStylePath}/common/images/cc-0.png',
293 'icon' =>
'{$wgStylePath}/common/images/public-domain.png',
296 'url' =>
'http://www.gnu.org/copyleft/fdl.html',
297 'icon' =>
'{$wgStylePath}/common/images/gnu-fdl.png',
304 'cc-choose' =>
array(
316 'https://lists.wikimedia.org/mailman/subscribe/mediawiki-announce';
322 'ca',
'cs',
'da',
'de',
'en',
'es',
'et',
'eu',
'fi',
'fr',
'hr',
'hu',
323 'it',
'ja',
'ko',
'lt',
'nl',
'no',
'pl',
'pt',
'pt-br',
'ro',
'ru',
324 'sl',
'sr',
'sv',
'tr',
'uk'
340 abstract public function showError( $msg );
359 $wgMessagesDirs[
'MediawikiInstaller'] = __DIR__ .
'/i18n';
366 foreach ( $this->defaultVarNames
as $var ) {
371 foreach ( self::getDBTypes()
as $type ) {
374 if ( !$installer->isCompiled() ) {
379 $defaults = $installer->getGlobalDefaults();
381 foreach ( $installer->getGlobalNames()
as $var ) {
382 if ( isset( $defaults[$var] ) ) {
383 $this->
settings[$var] = $defaults[$var];
419 $phpVersion = phpversion();
420 if ( version_compare( $phpVersion, self::MINIMUM_PHP_VERSION,
'>=' ) ) {
421 $this->
showMessage(
'config-env-php', $phpVersion );
424 $this->
showMessage(
'config-env-php-toolow', $phpVersion, self::MINIMUM_PHP_VERSION );
430 list( $pcreVersion ) = explode(
' ', PCRE_VERSION, 2 );
431 if ( version_compare( $pcreVersion, self::MINIMUM_PCRE_VERSION,
'<' ) ) {
432 $this->
showError(
'config-pcre-old', self::MINIMUM_PCRE_VERSION, $pcreVersion );
438 foreach ( $this->envChecks
as $check ) {
439 $status = $this->$check();
440 if ( $status ===
false ) {
446 $this->
setVar(
'_Environment', $good );
500 $type = strtolower(
$type );
502 if ( !isset( $this->dbInstallers[
$type] ) ) {
503 $class = ucfirst(
$type ) .
'Installer';
504 $this->dbInstallers[
$type] =
new $class( $this );
507 return $this->dbInstallers[
$type];
519 $_lsExists = file_exists(
"$IP/LocalSettings.php" );
527 require
"$IP/includes/DefaultSettings.php";
528 require
"$IP/LocalSettings.php";
530 return get_defined_vars();
543 return str_repeat(
'*', strlen( $realPassword ) );
554 if ( !preg_match(
'/^\*+$/',
$value ) ) {
571 if ( !function_exists(
'posix_getegid' ) || !function_exists(
'posix_getpwuid' ) ) {
572 # I don't know this, this isn't UNIX.
576 # posix_getegid() *not* getmygid() because we want the group of the webserver,
577 # not whoever owns the current script.
578 $gid = posix_getegid();
579 $getpwuid = posix_getpwuid( $gid );
580 $group = $getpwuid[
'name'];
601 public function parse( $text, $lineStart =
false ) {
605 $out =
$wgParser->parse( $text, $this->parserTitle, $this->parserOptions, $lineStart );
608 $html =
'<!--DB access attempted during parse--> ' . htmlspecialchars( $text );
610 if ( !empty( $this->debug ) ) {
611 $html .=
"<!--\n" .
$e->getTraceAsString() .
"\n-->";
626 $this->parserOptions->setExternalLinkTarget(
false );
630 global $wgExternalLinkTarget;
631 $this->parserOptions->setExternalLinkTarget( $wgExternalLinkTarget );
644 if ( !$status->isOK() ) {
647 $status->value->insert(
651 'ss_total_views' => 0,
652 'ss_total_edits' => 0,
653 'ss_good_articles' => 0,
654 'ss_total_pages' => 0,
669 if ( substr(
$name, 0, 2 ) ==
'wg' ) {
686 foreach ( self::getDBTypes()
as $name ) {
687 $allNames[] =
wfMessage(
"config-type-$name" )->text();
692 $databases = array_flip( $databases );
693 foreach ( array_keys( $databases )
as $db ) {
696 if ( !$status->isGood() ) {
699 if ( !$status->isOK() ) {
700 unset( $databases[$db] );
703 $databases = array_flip( $databases );
705 $this->
showError(
'config-no-db', $wgLang->commaList( $allNames ) );
730 $this->
showError(
'config-brokenlibxml' );
744 $this->
showError(
'config-magic-quotes-runtime' );
758 $this->
showError(
'config-magic-quotes-sybase' );
786 $this->
setVar(
'_SafeMode',
true );
798 if ( !function_exists(
"utf8_encode" ) ) {
817 $regexd = preg_replace(
'/[\x{0430}-\x{04FF}]/iu',
'',
'-АБВГД-' );
822 $regexprop = preg_replace(
'/\p{Zs}/u',
'',
"-\xE3\x80\x80-" );
824 if ( $regexd !=
'--' || $regexprop !=
'--' ) {
825 $this->
showError(
'config-pcre-no-utf8' );
838 $limit = ini_get(
'memory_limit' );
846 if ( $n < $this->minMemorySize * 1024 * 1024 ) {
847 $newLimit =
"{$this->minMemorySize}M";
849 if ( ini_set(
"memory_limit", $newLimit ) ===
false ) {
853 $this->
setVar(
'_RaiseMemory',
true );
865 foreach ( $this->objectCaches
as $name => $function ) {
866 if ( function_exists( $function ) ) {
870 $caches[
$name] =
true;
878 $this->
setVar(
'_Caches', $caches );
886 if ( self::apacheModulePresent(
'mod_security' ) ) {
898 $names =
array(
"gdiff3",
"diff3",
"diff3.exe" );
899 $versionInfo =
array(
'$1 --version 2>&1',
'GNU diffutils' );
904 $this->
setVar(
'wgDiff3', $diff3 );
906 $this->
setVar(
'wgDiff3',
false );
919 $versionInfo =
array(
'$1 -version',
'ImageMagick' );
922 $this->
setVar(
'wgImageMagickConvertCommand',
'' );
924 $this->
setVar(
'wgImageMagickConvertCommand', $convert );
925 $this->
showMessage(
'config-imagemagick', $convert );
928 } elseif ( function_exists(
'imagejpeg' ) ) {
945 $versionInfo =
array(
'$1 --version',
'git version' );
950 $this->
setVar(
'wgGitBin', $git );
953 $this->
setVar(
'wgGitBin',
false );
965 if ( $server !==
null ) {
966 $this->
showMessage(
'config-using-server', $server );
967 $this->
setVar(
'wgServer', $server );
985 $IP = dirname( dirname( __DIR__ ) );
986 $this->
setVar(
'IP', $IP );
990 $this->
getVar(
'wgServer' ),
991 $this->
getVar(
'wgScriptPath' )
1003 if ( defined(
'MW_INSTALL_PHP5_EXT' ) ) {
1008 $this->
setVar(
'wgScriptExtension',
".$ext" );
1018 $os = php_uname(
's' );
1019 $supported =
array(
'Linux',
'SunOS',
'HP-UX',
'Darwin' ); # Tested these
1021 if ( !in_array( $os, $supported ) ) {
1025 # Get a list of available locales.
1034 $candidatesByLocale =
array();
1035 $candidatesByLang =
array();
1038 if (
$line ===
'' ) {
1042 if ( !preg_match(
'/^([a-zA-Z]+)(_[a-zA-Z]+|)\.(utf8|UTF-8)(@[a-zA-Z_]*|)$/i',
$line, $m ) ) {
1046 list( , $lang, , , ) = $m;
1048 $candidatesByLocale[$m[0]] = $m;
1049 $candidatesByLang[$lang][] = $m;
1052 # Try the current value of LANG.
1053 if ( isset( $candidatesByLocale[getenv(
'LANG' )] ) ) {
1054 $this->
setVar(
'wgShellLocale', getenv(
'LANG' ) );
1059 # Try the most common ones.
1060 $commonLocales =
array(
'en_US.UTF-8',
'en_US.utf8',
'de_DE.UTF-8',
'de_DE.utf8' );
1061 foreach ( $commonLocales
as $commonLocale ) {
1062 if ( isset( $candidatesByLocale[$commonLocale] ) ) {
1063 $this->
setVar(
'wgShellLocale', $commonLocale );
1069 # Is there an available locale in the Wiki's language?
1070 $wikiLang = $this->
getVar(
'wgLanguageCode' );
1072 if ( isset( $candidatesByLang[$wikiLang] ) ) {
1073 $m = reset( $candidatesByLang[$wikiLang] );
1074 $this->
setVar(
'wgShellLocale', $m[0] );
1079 # Are there any at all?
1080 if ( count( $candidatesByLocale ) ) {
1081 $m = reset( $candidatesByLocale );
1082 $this->
setVar(
'wgShellLocale', $m[0] );
1099 $url = $this->
getVar(
'wgServer' ) . $this->
getVar(
'wgScriptPath' ) .
'/images/';
1115 $maxValueLength = ini_get(
'suhosin.get.max_value_length' );
1116 if ( $maxValueLength > 0 && $maxValueLength < 1024 ) {
1118 $this->
showMessage(
'config-suhosin-max-value-length', $maxValueLength );
1133 } elseif ( $c <= 0x7FF ) {
1134 return chr( 0xC0 | $c >> 6 ) . chr( 0x80 | $c & 0x3F );
1135 } elseif ( $c <= 0xFFFF ) {
1136 return chr( 0xE0 | $c >> 12 ) . chr( 0x80 | $c >> 6 & 0x3F )
1137 . chr( 0x80 | $c & 0x3F );
1138 } elseif ( $c <= 0x10FFFF ) {
1139 return chr( 0xF0 | $c >> 18 ) . chr( 0x80 | $c >> 12 & 0x3F )
1140 . chr( 0x80 | $c >> 6 & 0x3F )
1141 . chr( 0x80 | $c & 0x3F );
1151 $utf8 = function_exists(
'utf8_normalize' );
1152 $intl = function_exists(
'normalizer_normalize' );
1164 $useNormalizer =
'php';
1165 $needsUpdate =
false;
1172 $useNormalizer =
'utf8';
1174 if ( $utf8 !== $normal_c ) {
1175 $needsUpdate =
true;
1179 $useNormalizer =
'intl';
1180 $intl = normalizer_normalize( $not_normal_c, Normalizer::FORM_C );
1181 if ( $intl !== $normal_c ) {
1182 $needsUpdate =
true;
1188 if ( $useNormalizer ===
'php' ) {
1189 $this->
showMessage(
'config-unicode-pure-php-warning' );
1191 $this->
showMessage(
'config-unicode-using-' . $useNormalizer );
1192 if ( $needsUpdate ) {
1193 $this->
showMessage(
'config-unicode-update-warning' );
1202 if ( !function_exists(
'ctype_digit' ) ) {
1215 if ( !function_exists(
'json_decode' ) ) {
1233 array(
'/usr/bin',
'/usr/local/bin',
'/opt/csw/bin',
1234 '/usr/gnu/bin',
'/usr/sfw/bin',
'/sw/bin',
'/opt/local/bin' ),
1235 explode( PATH_SEPARATOR, getenv(
'PATH' ) )
1257 if ( !is_array( $names ) ) {
1258 $names =
array( $names );
1265 $file_exists = file_exists(
$command );
1268 if ( $file_exists ) {
1269 if ( !$versionInfo ) {
1296 foreach ( self::getPossibleBinPaths()
as $path ) {
1298 if ( $exe !==
false ) {
1315 $scriptTypes =
array(
1317 "<?php echo 'ex' . 'ec';",
1318 "#!/var/env php5\n<?php echo 'ex' . 'ec';",
1326 foreach ( $scriptTypes
as $ext => $contents ) {
1342 if ( $text ==
'exec' ) {
1362 if ( function_exists(
'apache_get_modules' ) && in_array( $moduleName, apache_get_modules() ) ) {
1367 phpinfo( INFO_MODULES );
1368 $info = ob_get_clean();
1370 return strpos( $info, $moduleName ) !==
false;
1379 $this->parserOptions->setTargetLanguage( $lang );
1380 $this->parserOptions->setUserLang( $lang );
1389 return "{$_SERVER['PHP_SELF']}?page=" . urlencode( $page );
1399 if ( $this->
getVar(
'IP' ) ===
null ) {
1403 $extDir = $this->
getVar(
'IP' ) .
'/extensions';
1404 if ( !is_readable( $extDir ) || !is_dir( $extDir ) ) {
1408 $dh = opendir( $extDir );
1410 while ( (
$file = readdir( $dh ) ) !==
false ) {
1411 if ( !is_dir(
"$extDir/$file" ) ) {
1414 if ( file_exists(
"$extDir/$file/$file.php" ) ) {
1419 natcasesort( $exts );
1431 $exts = $this->
getVar(
'_Extensions' );
1432 $IP = $this->
getVar(
'IP' );
1443 $wgAutoloadClasses =
array();
1445 require
"$IP/includes/DefaultSettings.php";
1447 foreach ( $exts
as $e ) {
1448 require_once
"$IP/extensions/$e/$e.php";
1451 $hooksWeWant = isset(
$wgHooks[
'LoadExtensionSchemaUpdates'] ) ?
1456 $GLOBALS[
'wgHooks'] =
array(
'LoadExtensionSchemaUpdates' => $hooksWeWant );
1474 $coreInstallSteps =
array(
1475 array(
'name' =>
'database',
'callback' =>
array( $installer,
'setupDatabase' ) ),
1476 array(
'name' =>
'tables',
'callback' =>
array( $installer,
'createTables' ) ),
1477 array(
'name' =>
'interwiki',
'callback' =>
array( $installer,
'populateInterwikiTable' ) ),
1478 array(
'name' =>
'stats',
'callback' =>
array( $this,
'populateSiteStats' ) ),
1479 array(
'name' =>
'keys',
'callback' =>
array( $this,
'generateKeys' ) ),
1480 array(
'name' =>
'sysop',
'callback' =>
array( $this,
'createSysop' ) ),
1481 array(
'name' =>
'mainpage',
'callback' =>
array( $this,
'createMainpage' ) ),
1486 foreach ( $coreInstallSteps
as $step ) {
1487 $this->installSteps[] = $step;
1488 if ( isset( $this->extraInstallSteps[$step[
'name']] ) ) {
1489 $this->installSteps = array_merge(
1490 $this->installSteps,
1491 $this->extraInstallSteps[$step[
'name']]
1497 if ( isset( $this->extraInstallSteps[
'BEGINNING'] ) ) {
1498 $this->installSteps = array_merge(
1499 $this->extraInstallSteps[
'BEGINNING'],
1505 if ( count( $this->
getVar(
'_Extensions' ) ) ) {
1506 array_unshift( $this->installSteps,
1507 array(
'name' =>
'extensions',
'callback' =>
array( $this,
'includeExtensions' ) )
1509 $this->installSteps[] =
array(
1510 'name' =>
'extension-tables',
1511 'callback' =>
array( $installer,
'createExtensionTables' )
1527 $installResults =
array();
1531 foreach ( $steps
as $stepObj ) {
1532 $name = $stepObj[
'name'];
1533 call_user_func_array( $startCB,
array(
$name ) );
1536 $status = call_user_func( $stepObj[
'callback'], $installer );
1539 call_user_func( $endCB,
$name, $status );
1540 $installResults[
$name] = $status;
1544 if ( !$status->isOk() ) {
1548 if ( $status->isOk() ) {
1549 $this->
setVar(
'_InstallDone',
true );
1552 return $installResults;
1562 if ( strval( $this->
getVar(
'wgUpgradeKey' ) ) ===
'' ) {
1563 $keys[
'wgUpgradeKey'] = 16;
1586 $this->
setVar( $name, $secretKey );
1591 $names = preg_replace(
'/^(.*)$/',
'\$$1', $names );
1593 $status->warning(
'config-insecure-keys',
$wgLang->listToText( $names ), count( $names ) );
1613 if (
$user->idForName() == 0 ) {
1614 $user->addToDatabase();
1617 $user->setPassword( $this->
getVar(
'_AdminPassword' ) );
1622 $user->addGroup(
'sysop' );
1623 $user->addGroup(
'bureaucrat' );
1624 if ( $this->
getVar(
'_AdminEmail' ) ) {
1625 $user->setEmail( $this->
getVar(
'_AdminEmail' ) );
1627 $user->saveSettings();
1631 $ssUpdate->doUpdate();
1635 if ( $this->
getVar(
'_Subscribe' ) && $this->
getVar(
'_AdminEmail' ) ) {
1647 'email' => $this->
getVar(
'_AdminEmail' ),
1654 $myLang = $this->
getVar(
'_UserLang' );
1655 if ( in_array( $myLang, $this->mediaWikiAnnounceLanguages ) ) {
1656 $myLang = $myLang ==
'pt-br' ?
'pt_BR' : $myLang;
1657 $params[
'language'] = $myLang;
1662 array(
'method' =>
'POST',
'postData' =>
$params ) )->execute();
1664 $s->warning(
'config-install-subscribe-fail',
$res->getMessage() );
1667 $s->warning(
'config-install-subscribe-notpossible' );
1682 wfMessage(
'mainpagetext' )->inContentLanguage()->
text() .
"\n\n" .
1683 wfMessage(
'mainpagedocfooter' )->inContentLanguage()->
text()
1686 $page->doEditContent( $content,
1694 $status->fatal(
'config-install-mainpage-failed',
$e->getMessage() );
1704 define(
'MW_NO_SESSION', 1 );
1707 $GLOBALS[
'wgUseDatabaseMessages'] =
false;
1711 $GLOBALS[
'wgShowExceptionDetails'] =
true;
1713 $GLOBALS[
'wgExternalLinkTarget'] =
'_blank';
1716 $GLOBALS[
'wgShowSQLErrors'] =
true;
1717 $GLOBALS[
'wgShowDBErrorBacktrace'] =
true;
1720 $GLOBALS[
'wgDisableOutputCompression'] =
true;
1723 $GLOBALS[
'wgCookiePrefix'] =
'mw_installer';
1729 $GLOBALS[
'wgResourceLoaderLESSFunctions'][
'embeddable'] =
function ( $frame, $less ) {
1730 return $less->toBool(
false );
1741 public function addInstallStep( $callback, $findStep =
'BEGINNING' ) {
1742 $this->extraInstallSteps[$findStep][] = $callback;
1751 set_time_limit( 0 );
envCheckBrokenXML()
Some versions of libxml+PHP break < and > encoding horribly.
Set options of the Parser.
__construct()
Constructor, always call this from child classes.
static newFromId( $id)
Static factory method for creation from a given user ID.
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
wfShellExec( $cmd, &$retval=null, $environ=array(), $limits=array(), $options=array())
Execute a shell command, with time and memory limits mirrored from the PHP configuration if supported...
static disableBackend()
Disables all access to the load balancer, will cause all database access to throw a DBAccessError.
static wasStrong()
Return a boolean indicating whether or not the source used for cryptographic random bytes generation ...
createMainpage(DatabaseInstaller $installer)
Insert Main Page with default content.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
showMessage( $msg)
UI interface for displaying a short message The parameters are like parameters to wfMessage().
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
const MINIMUM_PHP_VERSION
parse( $text, $lineStart=false)
Convert wikitext $text to HTML.
global $wgAutoloadClasses
showStatusMessage(Status $status)
Show a message to the installing user by using a Status object.
dirIsExecutable( $dir, $url)
Checks if scripts located in the given directory can be executed via the given URL.
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
envCheckLibicu()
Check the libicu version.
static newMainPage()
Create a new Title for the Main Page.
envCheckExtension()
Environment check for setting the preferred PHP file extension.
populateSiteStats(DatabaseInstaller $installer)
Install step which adds a row to the site_stats table with appropriate initial values.
array $extraInstallSteps
Extra steps for installation, for things like DatabaseInstallers to modify.
getConnection()
Connect to the database using the administrative user/password currently defined in the session.
array $rightsProfiles
User rights profiles.
envCheckShellLocale()
Environment check for preferred locale in shell.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
wfSuppressWarnings( $end=false)
Reference-counted warning suppression.
envCheckMbstring()
Environment check for mbstring.func_overload.
envCheckUploadsDirectory()
Environment check for the permissions of the uploads directory.
static newGood( $value=null)
Factory function for good results.
performInstallation( $startCB, $endCB)
Actually perform the installation.
$mediaWikiAnnounceLanguages
Supported language codes for Mailman.
Thrown by User::setPassword() on error.
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
checkPrerequisites()
Checks for installation prerequisites other than those checked by isCompiled()
static generateHex( $chars, $forceStrong=false)
Generate a run of (ideally) cryptographically random data and return it in hexadecimal string format.
array $dbInstallers
Cached DB installer instances, access using getDBInstaller().
setParserLanguage( $lang)
ParserOptions are constructed before we determined the language, so fix it.
$wgHooks['ArticleShow'][]
addInstallStep( $callback, $findStep='BEGINNING')
Add an installation step following the given step.
array $internalDefaults
Variables that are stored alongside globals, and are used for any configuration of the installation p...
setPassword( $name, $value)
Set a variable which stores a password, except if the new value is a fake password in which case leav...
envGetDefaultServer()
Helper function to be called from envCheckServer()
preInstall()
Allow DB installers a chance to make last-minute changes before installation occurs.
setVar( $name, $value)
Set a MW configuration variable, or internal installer configuration variable.
Title $parserTitle
Cached Title, used by parse().
array $objectCaches
Known object cache types and the functions used to test for their existence.
static locateExecutableInDefaultPaths( $names, $versionInfo=false)
Same as locateExecutable(), but checks in getPossibleBinPaths() by default.
Generic operation result class Has warning/error list, boolean status and arbitrary value.
static overrideConfig()
Override the necessary bits of the config to run an installation.
createSysop()
Create the first user account, grant it sysop and bureaucrat rights.
getFakePassword( $realPassword)
Get a fake password for sending back to the user in HTML.
envCheckSuhosinMaxValueLength()
Checks if suhosin.get.max_value_length is set, and if so generate a warning because it decreases Reso...
static getLocalisationCache()
Get the LocalisationCache instance.
showError( $msg)
Same as showMessage(), but for displaying errors.
static getPossibleBinPaths()
Get an array of likely places we can find executables.
static factory(Title $title)
Create a WikiPage object of the appropriate class for the given title.
envCheckRegisterGlobals()
Environment check for register_globals.
wfRestoreWarnings()
Restore error level to previous value.
envCheckDiff3()
Search for GNU diff3.
envCheckMagicQuotes()
Environment check for magic_quotes_runtime.
generateKeys()
Generate $wgSecretKey.
envCheckMagicSybase()
Environment check for magic_quotes_sybase.
envCheckMemory()
Environment check for available memory.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form externallinks including delete and has completed for all link tables default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<
getCompiledDBs()
Get a list of DBs supported by current PHP setup.
exportVars()
Exports all wg* variables stored by the installer into global scope.
integer $minMemorySize
Minimum memory size in MB.
envCheckCache()
Environment check for compiled object cache types.
static getExistingLocalSettings()
Determine if LocalSettings.php exists.
envCheckPath()
Environment check for setting $IP and $wgScriptPath.
wfShorthandToInteger( $string='')
Converts shorthand byte notation to integer form.
doGenerateKeys( $keys)
Generate a secret value for variables using our CryptRand generator.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
ParserOptions $parserOptions
Cached ParserOptions, used by parse().
when a variable name is used in a it is silently declared as a new masking the global
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration settings
Class for handling updates to the site_stats table.
getVar( $name, $default=null)
Get an MW configuration variable, or internal installer configuration variable.
Content object for wiki text pages.
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
envCheckXML()
Environment check for the XML module.
static get( $url, $timeout='default', $options=array())
Simple wrapper for Http::request( 'GET' )
Allows to change the fields on the form that will be generated $name
Exception class for attempted DB access.
array $installSteps
The actual list of installation steps.
wfIsWindows()
Check if the operating system is Windows.
wfEscapeShellArg()
Windows-compatible version of escapeshellarg() Windows doesn't recognise single-quotes in the shell,...
getDBInstaller( $type=false)
Get an instance of DatabaseInstaller for the specified DB type.
Base class for DBMS-specific installation helper classes.
envCheckDB()
Environment check for DB types.
getInstallSteps(DatabaseInstaller $installer)
Get an array of install steps.
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
array $compiledDBs
List of detected DBs, access using getCompiledDBs().
wfIniGetBool( $setting)
Safety wrapper around ini_get() for boolean settings.
doEnvironmentChecks()
Do initial checks of the PHP environment.
if(PHP_SAPI !='cli') $file
envCheckGraphics()
Environment check for ImageMagick and GD.
static apacheModulePresent( $moduleName)
Checks for presence of an Apache module.
Test for PHP+libxml2 bug which breaks XML input subtly with certain versions.
Represents a title within MediaWiki.
envCheckPCRE()
Environment check for the PCRE module.
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as $wgLang
if(count( $args)==0) $dir
static canMakeRequests()
Simple function to test if we can make any sort of requests at all, using cURL or fopen()
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
array $licenses
License types.
disableTimeLimit()
Disable the time limit for execution.
findExtensions()
Finds extensions that follow the format /extensions/Name/Name.php, and returns an array containing th...
if(PHP_SAPI !='cli') $source
envCheckServer()
Environment check for the server hostname.
const MINIMUM_PCRE_VERSION
The oldest version of PCRE we can support.
static getDBTypes()
Get a list of known DB types.
envCheckSafeMode()
Environment check for safe_mode.
$mediaWikiAnnounceUrl
URL to mediawiki-announce subscription.
includeExtensions()
Installs the auto-detected extensions.
static factory( $url, $options=null)
Generate a new request object.
envCheckGit()
Search for git.
getDocUrl( $page)
Overridden by WebInstaller to provide lastPage parameters.
subscribeToMediaWikiAnnounce(Status $s)
unicodeChar( $c)
Convert a hex string representing a Unicode code point to that code point.
static maybeGetWebserverPrimaryGroup()
On POSIX systems return the primary group of the webserver we're running under.
array $defaultVarNames
MediaWiki configuration globals that will eventually be passed through to LocalSettings....
static newFatal( $message)
Factory function for fatal errors.
array $envChecks
A list of environment check methods called by doEnvironmentChecks().
envCheckModSecurity()
Scare user to death if they have mod_security.
static locateExecutable( $path, $names, $versionInfo=false)
Search a path for any of the given executable names.