Warning: you requested the $encRequested schema, " .
- "but the existing database has the $encExisting schema. This upgrade script ".
+ "but the existing database has the $encExisting schema. This upgrade script ".
"can't convert it, so it will remain $encExisting.
\n";
+ } else {
+ print " FAILED\n";
+ dieout( htmlspecialchars( $res ) );
+ }
} elseif (is_callable(array($wgDatabase, 'setup_database'))) {
$wgDatabase->setup_database();
}
@@ -1216,10 +1282,8 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
continue;
}
- print " done.\n";
-
-
- if ($conf->DBtype == 'ibm_db2') {
+
+ if ( $conf->DBtype == 'ibm_db2' ) {
// Now that table creation is done, make sure everything is committed
// Do this before doing inserts through API
if ($wgDatabase->lastError()) {
@@ -1230,6 +1294,10 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
print "
MediaWiki tables successfully created
\n";
$wgDatabase->commit();
}
+ } elseif ( $conf->DBtype == 'sqlite' ) {
+ // Ensure proper searchindex format. We have to do that separately because
+ // if SQLite is compiled without the FTS3 module, table creation syntax will be invalid.
+ sqlite_setup_searchindex();
}
print "
Initializing statistics...
\n";
@@ -1254,8 +1322,13 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
} else {
# Yes, so run the grants
echo( "
" . htmlspecialchars( "Granting user permissions to $wgDBuser on $wgDBname..." ) );
- $wgDatabase->sourceFile( "../maintenance/users.sql" );
- echo( "success.
";
aField( $conf, 'Shm', 'XCache', 'radio', 'xcache' );
@@ -1456,10 +1524,10 @@ if( count( $errs ) ) {
An object caching system such as memcached will provide a significant performance boost,
but needs to be installed. Provide the server addresses and ports in a comma-separated list.
- MediaWiki can also detect and support eAccelerator, Turck MMCache, APC, and XCache, but
+ MediaWiki can also detect and support eAccelerator, APC, and XCache, but
these should not be used if the wiki will be running on multiple application servers.
-
- DBA (Berkeley-style DB) is generally slower than using no cache at all, and is only
+
+ DBA (Berkeley-style DB) is generally slower than using no cache at all, and is only
recommended for testing.
@@ -1493,14 +1561,14 @@ if( count( $errs ) ) {
-
-
+
+
For this feature to work, an e-mail address must be present for the user account, and the notification
- options in the user's preferences must be enabled. Also note the
+ options in the user's preferences must be enabled. Also note the
authentication option below. When testing the feature, keep in mind that your own changes will never trigger notifications to be sent to yourself.
There are additional options for fine tuning in /includes/DefaultSettings.php; copy these to your LocalSettings.php and edit them there to change them.
+ If your database server isn't on your web server, enter the name or IP address here.
+
-
- If your database server isn't on your web server, enter the name or IP address here.
-
-
-
-
-
-
-
- If you only have a single user account and database available,
- enter those here. If you have database root access (see below)
- you can specify new accounts/databases to be created. This account
- will not be created if it pre-exists. If this is the case, ensure that it
- has SELECT, INSERT, UPDATE, and DELETE permissions on the MediaWiki database.
-
+ If you only have a single user account and database available,
+ enter those here. If you have database root access (see below)
+ you can specify new accounts/databases to be created. This account
+ will not be created if it pre-exists. If this is the case, ensure that it
+ has SELECT, INSERT, UPDATE, and DELETE permissions on the MediaWiki database.
+
+
+
+
+ checked="checked" />
+
+
+
+
+
+
+ If the database user specified above does not exist, or does not have access to create
+ the database (if needed) or tables within it, please check the box and provide details
+ of a superuser account, such as root, which does.
+
-
-
-
-
- If the database user specified above does not exist, or does not have access to create
- the database (if needed) or tables within it, please check the box and provide details
- of a superuser account, such as root, which does.
-
@@ -1588,8 +1658,8 @@ if( count( $errs ) ) {
- InnoDB is best for public web installations, since it has good concurrency
- support. MyISAM may be faster in single-user installations. MyISAM databases
+ InnoDB is best for public web installations, since it has good concurrency
+ support. MyISAM may be faster in single-user installations. MyISAM databases
tend to get corrupted more often than InnoDB databases.
@@ -1601,60 +1671,50 @@ if( count( $errs ) ) {
- This option is ignored on upgrade, the same character set will be kept.
-
+ This option is ignored on upgrade, the same character set will be kept.
+
WARNING: If you use backwards-compatible UTF-8 on MySQL 4.1+, and subsequently back up the database with mysqldump, it may destroy all non-ASCII characters, irreversibly corrupting your backups!.
-
+
In binary mode, MediaWiki stores UTF-8 text to the database in binary fields. This is more efficient than MySQL's UTF-8 mode, and allows you to use the full range of Unicode characters. In UTF-8 mode, MySQL will know what character set your data is in, and can present and convert it appropriately, but it won't let you store characters above the Basic Multilingual Plane.
-
+
-
The username specified above (at "DB username") will have its search path set to the above schemas,
- so it is recommended that you create a new user. The above schemas are generally correct:
+
The username specified above (at "DB username") will have its search path set to the above schemas,
+ so it is recommended that you create a new user. The above schemas are generally correct:
only change them if you are sure you need to.
-
- NOTE: SQLite only uses the Database name setting above, the user, password and root settings are ignored.
-
-
SQLite stores table data into files in the filesystem.
- If you do not provide an explicit path, a "data" directory in
- the parent of your document root will be used.
-
+
SQLite stores table data into files in the
+ filesystem.
+
This directory must exist and be writable by the web server.
-
-
+
+
-
If you need to share one database between multiple wikis, or
- between MediaWiki and another web application, you may choose to
- add a prefix to all the table names to avoid conflicts.
-
-
Avoid exotic characters; something like mw_ is good.
To complete the installation, please do the following:
@@ -1716,9 +1776,9 @@ remotely. LocalSettings.php is currently owned by the user your webserver is run
which means that anyone on the same server can read your database password! Downloading
it and uploading it again will hopefully change the ownership to a user ID specific to you.
-EOT;
+HTML;
} else {
- echo <<
Installation successful!
@@ -1727,7 +1787,7 @@ Move the config/LocalSettings.php file to the parent directory, then fo
You should change file permissions for LocalSettings.php as required to
prevent other users on the server reading passwords and altering configuration data.
-EOT;
+HTML;
}
}
@@ -1753,6 +1813,11 @@ function writeLocalSettings( $conf ) {
$convert = ($conf->ImageMagick ? $conf->ImageMagick : "/usr/bin/convert" );
$rights = ($conf->RightsUrl) ? "" : "# ";
$hashedUploads = $conf->safeMode ? '' : '# ';
+ $dir = realpath( $conf->SQLiteDataDir );
+ if ( !$dir ) {
+ $dir = $conf->SQLiteDataDir; // dumb realpath sometimes fails
+ }
+ $sqliteDataDir = escapePhpString( $dir );
if ( $conf->ShellLocale ) {
$locale = '';
@@ -1766,7 +1831,6 @@ function writeLocalSettings( $conf ) {
$cacheType = 'CACHE_MEMCACHED';
$mcservers = var_export( $conf->MCServerArray, true );
break;
- case 'turck':
case 'xcache':
case 'apc':
case 'eaccel':
@@ -1825,11 +1889,6 @@ function writeLocalSettings( $conf ) {
# Needs literal string interpolation for the current style path
$slconf['RightsIcon'] = $conf->RightsIcon;
}
-
- if( $conf->populateadmin ) {
- $slconf['DBadminuser'] = $conf->RootUser;
- $slconf['DBadminpassword'] = $conf->RootPW;
- }
if( $conf->DBtype == 'mysql' ) {
$dbsettings =
@@ -1845,26 +1904,22 @@ function writeLocalSettings( $conf ) {
$dbsettings =
"# Postgres specific settings
\$wgDBport = \"{$slconf['DBport']}\";
-\$wgDBmwschema = \"{$slconf['DBmwschema']}\";
+\$wgDBmwschema = \"{$slconf['DBpgschema']}\";
\$wgDBts2schema = \"{$slconf['DBts2schema']}\";";
} elseif( $conf->DBtype == 'sqlite' ) {
$dbsettings =
"# SQLite-specific settings
-\$wgSQLiteDataDir = \"{$slconf['SQLiteDataDir']}\";";
- } elseif( $conf->DBtype == 'mssql' ) {
- $dbsettings =
-"# MSSQL specific settings
-\$wgDBprefix = \"{$slconf['DBprefix2']}\";";
+\$wgSQLiteDataDir = \"{$sqliteDataDir}\";";
} elseif( $conf->DBtype == 'ibm_db2' ) {
$dbsettings =
"# DB2 specific settings
-\$wgDBport_db2 = \"{$slconf['DBport_db2']}\";
-\$wgDBmwschema = \"{$slconf['DBmwschema']}\";
+\$wgDBport = \"{$slconf['DBport_db2']}\";
+\$wgDBmwschema = \"{$slconf['DBdb2schema']}\";
\$wgDBcataloged = \"{$slconf['DBcataloged']}\";";
} elseif( $conf->DBtype == 'oracle' ) {
$dbsettings =
"# Oracle specific settings
-\$wgDBprefix = \"{$slconf['DBprefix']}\";";
+\$wgDBprefix = \"{$slconf['DBprefix_ora']}\";";
} else {
// ummm... :D
$dbsettings = '';
@@ -1913,6 +1968,13 @@ if ( \$wgCommandLineMode ) {
\$wgScriptPath = \"{$slconf['ScriptPath']}\";
\$wgScriptExtension = \"{$slconf['ScriptExtension']}\";
+## The relative URL path to the skins directory
+\$wgStylePath = \"\$wgScriptPath/skins\";
+
+## The relative URL path to the logo. Make sure you change this from the default,
+## or else you'll overwrite your logo when you upgrade!
+\$wgLogo = \"\$wgStylePath/common/images/wiki.png\";
+
## UPO means: this is also a user preference option
\$wgEnableEmail = $enableemail;
@@ -1934,10 +1996,6 @@ if ( \$wgCommandLineMode ) {
{$dbsettings}
-## Database admin settings, used for maintenance scripts
-\$wgDBadminuser = \"". ($conf->populateadmin ? $slconf['DBadminuser'] : '' )."\";
-\$wgDBadminpassword = \"". ($conf->populateadmin ? $slconf['DBadminpassword'] : '' )."\";
-
## Shared memory settings
\$wgMainCacheType = $cacheType;
\$wgMemCachedServers = $mcservers;
@@ -1975,7 +2033,7 @@ if ( \$wgCommandLineMode ) {
\$wgSecretKey = \"$secretKey\";
## Default skin: you can change the default skin. Use the internal symbolic
-## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
+## names, ie 'vector', 'monobook':
\$wgDefaultSkin = 'monobook';
## For attaching licensing metadata to pages, and displaying an
@@ -1990,8 +2048,6 @@ if ( \$wgCommandLineMode ) {
\$wgDiff3 = \"{$slconf['diff3']}\";
-\$wgPhpCliPath = \"{$slconf['phpCliPath']}\";
-
# When you make changes to this configuration file, this will make
# sure that cached pages are cleared.
\$wgCacheEpoch = max( \$wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
@@ -2085,30 +2141,13 @@ function aField( &$conf, $field, $text, $type = "text", $value = "", $onclick =
}
function getLanguageList() {
- global $wgLanguageNames, $IP;
- if( !isset( $wgLanguageNames ) ) {
- require_once( "$IP/languages/Names.php" );
- }
+ global $wgDummyLanguageCodes;
$codes = array();
-
- $d = opendir( "../languages/messages" );
- /* In case we are called from the root directory */
- if (!$d)
- $d = opendir( "languages/messages");
- while( false !== ($f = readdir( $d ) ) ) {
- $m = array();
- if( preg_match( '/Messages([A-Z][a-z_]+)\.php$/', $f, $m ) ) {
- $code = str_replace( '_', '-', strtolower( $m[1] ) );
- if( isset( $wgLanguageNames[$code] ) ) {
- $name = wfBCP47( $code ) . ' - ' . $wgLanguageNames[$code];
- } else {
- $name = $code;
- }
- $codes[$code] = $name;
- }
+ foreach ( Language::getLanguageNames() as $code => $name ) {
+ if( in_array( $code, $wgDummyLanguageCodes ) ) continue;
+ $codes[$code] = $code . ' - ' . $name;
}
- closedir( $d );
ksort( $codes );
return $codes;
}
@@ -2196,7 +2235,7 @@ function database_switcher($db) {
global $ourdb;
$color = $ourdb[$db]['bgcolor'];
$full = $ourdb[$db]['fullname'];
- print "