<title>MediaWiki installation</title>
<style type="text/css">
- @import "../skins/monobook/main.css";
+ @import "../skins/monobook/main.css";
.env-check {
font-size: 90%;
# As a dirty hack, we'll try to set up the include path first.
#
$IP = dirname( dirname( __FILE__ ) );
-$sep = (DIRECTORY_SEPARATOR == "\\") ? ";" : ":";
-ini_set( "include_path", ".$sep$IP$sep$IP/includes$sep$IP/languages" );
+$sep = PATH_SEPARATOR;
+if( !ini_set( "include_path", ".$sep$IP$sep$IP/includes$sep$IP/languages" ) ) {
+ set_include_path( ".$sep$IP$sep$IP/includes$sep$IP/languages" );
+}
+
define( "MEDIAWIKI", true );
define( "MEDIAWIKI_INSTALL", true );
/* Check for existing configurations and bug out! */
if( file_exists( "../LocalSettings.php" ) ) {
- dieout( "<h2>Already configured</h2>
+ dieout( " <p><strong>Setup has completed, <a href='../index.php'>your wiki</a> is configured.</strong></p>
- <p><strong>Setup has completed, <a href='../index.php'>your wiki</a> is configured.</strong></p>
-
- <p>Please delete the /config directory for extra security.</p>" );
+ <p>Please delete the /config directory for extra security.</p></div></div></div></div>" );
}
if( file_exists( "./LocalSettings.php" ) ) {
install_version_checks();
-print "<li>PHP " . phpversion() . ": ok</li>\n";
+print "<li>PHP " . phpversion() . " installed</li>\n";
if( ini_get( "register_globals" ) ) {
?>
- <li><b class='error'>Warning:</b> <strong>PHP's
- <tt><a href="http://php.net/register_globals">register_globals</a></tt>
- option is enabled.</strong> MediaWiki will work correctly, but this setting
- increases your exposure to potential security vulnerabilities in PHP-based
- software running on your server. <strong>You should disable it if you are able.</strong></li>
+ <li>
+ <div style="font-size:110%">
+ <strong class="error">Warning:</strong>
+ <strong>PHP's <tt><a href="http://php.net/register_globals">register_globals</a></tt> option is enabled. Disable it if you can.</strong>
+ </div>
+ MediaWiki will work, but your server is more exposed to PHP-based security vulnerabilities.
+ </li>
<?php
}
<?php
}
+if( ini_get( "mbstring.func_overload" ) ) {
+ $fatal = true;
+ ?><li class='error'><strong>Fatal: <a href='http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload'>mbstring.func_overload</a> is active!</strong>
+ This option causes errors and may corrupt data unpredictably;
+ you cannot install or use MediaWiki unless this option is disabled.
+ <?php
+}
+
if( $fatal ) {
dieout( "</ul><p>Cannot install Mediawiki.</p>" );
}
case "apache2handler":
print "ok, using pretty URLs (<tt>index.php/Page_Title</tt>)";
break;
+default:
+ print "unknown; ";
case "cgi":
case "cgi-fcgi":
case "apache2filter":
+case "isapi":
print "using ugly URLs (<tt>index.php?title=Page_Title</tt>)";
$conf->prettyURLs = false;
break;
-default:
- print "unknown; using pretty URLs (<tt>index.php/Page_Title</tt>), if you have trouble change this in <tt>LocalSettings.php</tt>";
}
print "</li>\n";
}
$conf->diff3 = false;
-$diff3locations = array("/usr/bin", "/opt/csw/bin", "/usr/gnu/bin", "/usr/sfw/bin") + explode(":", getenv("PATH"));
-$diff3names = array("gdiff3", "diff3");
+$diff3locations = array("/usr/bin", "/opt/csw/bin", "/usr/gnu/bin", "/usr/sfw/bin") + explode($sep, getenv("PATH"));
+$diff3names = array("gdiff3", "diff3", "diff3.exe");
$diff3versioninfo = array('$1 --version 2>&1', 'diff3 (GNU diffutils)');
foreach ($diff3locations as $loc) {
$conf->ScriptPath = preg_replace( '{^(.*)/config.*$}', '$1', $_SERVER["PHP_SELF"] ); # was SCRIPT_NAME
print "<li>Script URI path: <tt>" . htmlspecialchars( $conf->ScriptPath ) . "</tt></li>\n";
-print "<li style='font-weight:bold;color:green'>Environment checked. You can install MediaWiki.</li>\n";
+print "<li style='font-weight:bold;color:green;font-size:110%'>Environment checked. You can install MediaWiki.</li>\n";
$conf->posted = ($_SERVER["REQUEST_METHOD"] == "POST");
$conf->Sitename = ucfirst( importPost( "Sitename", "" ) );
$conf->DBpassword = importPost( "DBpassword" );
$conf->DBpassword2 = importPost( "DBpassword2" );
$conf->DBprefix = importPost( "DBprefix" );
+ $conf->DBmysql5 = (importPost( "DBmysql5" ) == "true") ? "true" : "false";
$conf->RootPW = importPost( "RootPW" );
$conf->LanguageCode = importPost( "LanguageCode", "en" );
- $conf->SysopName = importPost( "SysopName", "WikiAdmin" );
+ $conf->SysopName = importPost( "SysopName", "WikiSysop" );
$conf->SysopPass = importPost( "SysopPass" );
$conf->SysopPass2 = importPost( "SysopPass2" );
$errs = array();
if( $conf->Sitename == "" || $conf->Sitename == "MediaWiki" || $conf->Sitename == "Mediawiki" ) {
- $errs["Sitename"] = "Must not be blank or \"MediaWiki\".";
+ $errs["Sitename"] = "Must not be blank or \"MediaWiki\"";
}
if( $conf->DBuser == "" ) {
$errs["DBuser"] = "Must not be blank";
<a href='http://dev.mysql.com/doc/mysql/en/old-client.html'
>http://dev.mysql.com/doc/mysql/en/old-client.html</a> for help.</b>";
}
+ if( $wgDBmysql5 ) {
+ if( $mysqlNewAuth ) {
+ print "; enabling MySQL 4.1/5.0 charset mode";
+ } else {
+ print "; <b class='error'>MySQL 4.1/5.0 charset mode enabled,
+ but older version detected; will likely fail.</b>";
+ }
+ }
print "</li>\n";
if ($conf->DBtype == 'mysql') {
# FIXME: Check for errors
print "<li>Creating tables...";
if ($conf->DBtype == 'mysql') {
- dbsource( "../maintenance/tables.sql", $wgDatabase );
+ if( $wgDBmysql5 ) {
+ print " using MySQL 5 table defs...";
+ dbsource( "../maintenance/mysql5/tables.sql", $wgDatabase );
+ } else {
+ print " using MySQL 4 table defs...";
+ dbsource( "../maintenance/tables.sql", $wgDatabase );
+ }
dbsource( "../maintenance/interwiki.sql", $wgDatabase );
} else {
dbsource( "../maintenance/oracle/tables.sql", $wgDatabase );
?>
</div>
<p class="config-desc">
- Preferably a short word without punctuation, i.e. "Wikipedia". Will appear as the namespace name for "meta" pages, and throughout the interface.
+ Preferably a short word without punctuation, i.e. "Wikipedia".<br>
+ Will appear as the namespace name for "meta" pages, and throughout the interface.
</p>
<div class="config-input">
<?php aField( $conf, "SysopPass2", "Password confirm:", "password" ) ?>
</div>
<p class="config-desc">
- An admin user account can lock or delete pages, block problematic IP
- addresses from editing, and other maintenance tasks. If creating a new
- wiki database, an admin account will be created with the given name
- and password.
+ An admin can lock/delete pages, block users from editing, and other maintenance tasks.<br>
+ A new account will be added only when creating a new wiki database.
</p>
<div class="config-input">
<label class='column'>E-mail notification:</label>
<ul class="plain">
<li><?php aField( $conf, "Enotif", "Disabled", "radio", "enotif_disabled" ); ?></li>
- <li><?php aField( $conf, "Enotif", "Enabled for changes of watch-listed and user_talk pages (recommended for small wikis; perhaps not suited for large wikis)", "radio", "enotif_allpages" ); ?></li>
- <li><?php aField( $conf, "Enotif", "Enabled for changes of user_talk pages only (suited for small and large wikis)", "radio", "enotif_usertalk" ); ?></li>
+ <li><?php aField( $conf, "Enotif", "Enabled for user_talk changes only", "radio", "enotif_usertalk" ); ?></li>
+ <li><?php aField( $conf, "Enotif", "Enabled for user_talk and watch list changes (not recommended for large wikis)", "radio", "enotif_allpages" ); ?></li>
</ul>
</div>
<div class="config-desc">
<p>Avoid exotic characters; something like <tt>mw_</tt> is good.</p>
</div>
+ <div class="config-input"><label class="column">Database charset</label>
+ <div>Select one:</div>
+ <ul class="plain">
+ <li><?php aField( $conf, "DBmysql5", "Backwards-compatible UTF-8", "radio", "false" ); ?></li>
+ <li><?php aField( $conf, "DBmysql5", "Experimental MySQL 4.1/5.0 UTF-8", "radio", "true" ); ?></li>
+ </ul>
+ </div>
+ <p class="config-desc">
+ <b>EXPERIMENTAL:</b> You can enable explicit Unicode charset support
+ for MySQL 4.1 and 5.0 servers. This is not well tested and may
+ cause things to break. <b>If upgrading an older installation, leave
+ in backwards-compatible mode.</b>
+ </p>
+
<div class="config-input">
<?php
aField( $conf, "RootPW", "DB root password:", "password" );
/* -------------------------------------------------------------------------------------- */
function writeSuccessMessage() {
- global $conf;
if ( ini_get( 'safe_mode' ) && !ini_get( 'open_basedir' ) ) {
echo <<<EOT
<p>Installation successful!</p>
$slconf['RightsIcon'] = $conf->RightsIcon;
}
- $sep = (DIRECTORY_SEPARATOR == "\\") ? ";" : ":";
+ $sep = PATH_SEPARATOR;
$localsettings = "
# This file was automatically generated by the MediaWiki installer.
# If you make manual changes, please keep track in case you need to
# file, not there.
\$IP = \"{$slconf['IP']}\";
-ini_set( \"include_path\", \".$sep\$IP$sep\$IP/includes$sep\$IP/languages\" );
+if( !ini_set( \"include_path\", \".$sep\$IP$sep\$IP/includes$sep\$IP/languages\" ) ) {
+ set_include_path( \".$sep\$IP$sep\$IP/includes$sep\$IP/languages\" );
+}
require_once( \"includes/DefaultSettings.php\" );
# If PHP's memory limit is very low, some operations may fail.
\$wgDBprefix = \"{$slconf['DBprefix']}\";
\$wgDBtype = \"{$slconf['DBtype']}\";
+# Experimental charset support for MySQL 4.1/5.0.
+\$wgDBmysql5 = {$conf->DBmysql5};
+
## Shared memory settings
\$wgMainCacheType = $cacheType;
\$wgMemCachedServers = $mcservers;
$radioCount = 0;
function aField( &$conf, $field, $text, $type = "text", $value = "" ) {
- global $radioCount;
+ global $radioCount;
if( $type != "" ) {
$xtype = "type=\"$type\"";
} else {
if(!(isset($id)) or ($id == "") ) $id = $field;
$nolabel = ($type == "radio") || ($type == "hidden");
-
+
if ($type == 'radio')
$id .= $radioCount++;
-
+
if( $nolabel ) {
echo "\t\t<label>";
} else {
$d = opendir( "../languages" );
while( false !== ($f = readdir( $d ) ) ) {
+ $m = array();
if( preg_match( '/Language([A-Z][a-z_]+)\.php$/', $f, $m ) ) {
$code = str_replace( '_', '-', strtolower( $m[1] ) );
if( isset( $wgLanguageNames[$code] ) ) {
$names = array($names);
foreach ($names as $name) {
- if (file_exists("$loc/$name")) {
+ $command = "$loc".DIRECTORY_SEPARATOR."$name";
+ if (file_exists($command)) {
if (!$versioninfo)
- return "$loc/$name";
+ return $command;
- $file = str_replace('$1', "$loc/$name", $versioninfo[0]);
+ $file = str_replace('$1', $command, $versioninfo[0]);
if (strstr(`$file`, $versioninfo[1]) !== false)
- return "$loc/$name";
+ return $command;
}
}
return false;
<div id="column-one">
<div class="portlet" id="p-logo">
<a style="background-image: url(../skins/common/images/mediawiki.png);"
- href="/phase3/index.php/Main_Page"
+ href="http://www.mediawiki.org/"
title="Main Page"></a>
</div>
<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
<div class='portlet'><div class='pBody'>
- <p style="font-size:90%"><strong><a href="http://www.mediawiki.org/">MediaWiki</a></strong> is Copyright (C) 2001-2005 by Magnus Manske, Brion Vibber, Lee Daniel Crocker, Tim Starling, Erik Möller, Gabriel Wicke and others.</p>
<ul>
+ <li><strong><a href="http://www.mediawiki.org/">MediaWiki home</a></strong></li>
<li><a href="../README">Readme</a></li>
<li><a href="../RELEASE-NOTES">Release notes</a></li>
- <li><a href="../docs/">doc/</a></li>
+ <li><a href="../docs/">Documentation</a></li>
<li><a href="http://meta.wikipedia.org/wiki/MediaWiki_User's_Guide">User's Guide</a></li>
+ <li><a href="http://meta.wikimedia.org/wiki/MediaWiki_FAQ">FAQ</a></li>
</ul>
+ <p style="font-size:90%;margin-top:1em">MediaWiki is Copyright © 2001-2006 by Magnus Manske, Brion Vibber, Lee Daniel Crocker, Tim Starling, Erik Möller, Gabriel Wicke and others.</p>
</div></div>
</div>