Manual: Konfigurations-Skript

Jump to navigation Jump to search
This page is a translated version of the page Manual:Config script and the translation is 14% complete.
Other languages:
Bahasa Indonesia • ‎Deutsch • ‎Deutsch (Sie-Form) • ‎English • ‎dansk • ‎español • ‎français • ‎italiano • ‎polski • ‎português do Brasil • ‎čeština • ‎русский • ‎বাংলা • ‎中文 • ‎日本語 • ‎한국어
MediaWiki-2020-icon.svg Handbuch:Installationsanleitung About MediaWiki
Help-browser.svg Features Installation requirements
Preferences-system.svg Downloading Installing Configuring

The 1.13alpha Config script

Nachdem Sie MediaWiki auf Ihren Webserver hochgeladen/installiert haben, müssen Sie als Erstes die Grundeinrichtung abschließen. Führen Sie dafür das mitgelieferte Konfigurations-Skript aus. Dieses Skript ermöglicht es Ihnen, MediaWiki die Informationen zu übergeben, die es benötigt, damit das Wiki gestartet werden kann.

MediaWiki Installationsformular öffnen

In den folgenden Beispielen wird davon ausgegangen, dass sich Ihre Website unter befindet, die sich physisch auf Ihrem Server unter /home/example/web befindet. Sie müssen die Beispiele anpassen, um die entsprechenden Verzeichnisse für Ihr System zu verwenden.

  1. Verwenden Sie Ihren Webbrowser, um die Hauptseite des Wikis aufzurufen. Das ist die Datei index.php in dem für das Web erreichbaren Ordner, in den Sie MediaWiki installiert haben. In der Regel ist das /w/index.php (z. B., vorausgesetzt, Sie haben MediaWiki in den Ordner /home/example/web/w installiert). (Sie sollten das Verzeichnis nicht /wiki/ genannt haben, falls Sie es als Kurz-URL verwenden wollen).
  2. Sie werden dann die installierte MediaWiki-Version sehen sowie einen Link zu "Bitte richten Sie das Wiki zuerst ein." Klicken Sie auf den Link, um das Konfigurations-Skript zu starten. Als Referenz (für den Fall, dass Sie direkt dorthin gehen wollen), befindet sich dieses im Verzeichnis mw-config des Wikis ( Sie würden also im obigen Beispiel zum Verzeichnis gehen).
    • Das Installer-Verzeichnis hieß vor der Version 1.17 config.
  3. Wenn das Skript einen Konfigurationsfehler erkennt, können Sie nicht fortfahren. Im Folgenden finden Sie Details zu den Fehlermeldungen, die auftreten können, und was Sie in diesem Fall tun können.
  4. Wenn alle Tests erfolgreich abgeschlossen wurden, wird ein Formular angezeigt, in das Sie die Informationen eingeben können, die MediaWiki nun benötigt.

Das Konfigurationsskript verwenden

Folgen Sie den Anweisungen auf dem Formular, um die erforderlichen Angaben zu machen (wenn Sie unsicher sind, was Sie eingeben sollen, lesen Sie die nachfolgende Tabelle) und klicken Sie schließlich auf die Schaltfläche „MediaWiki installieren!“. Das Skript wird nun die Datenbank mit Daten füllen und eine Konfigurationsdatei erstellen.

Nach erfolgreicher Ausführung des Setup-Skripts wird im Verzeichnis mw-config (bei älteren Versionen config) eine Datei mit dem Namen LocalSettings.php angelegt. Diese Datei enthält alle Informationen, die MediaWiki zur Ausführung benötigt. Weil dort das Passwort in Klartext des angegebenen Datenbankbenutzers gespeichert ist, sollten Sie unbedingt ein wikispezifisches Datenbankkonto anlegen (also nicht root). (siehe Datenbank-Benutzername in der Tabelle unten)

  1. Move this file to the main wiki directory (if you installed MediaWiki to /home/example/web/w, move it there).
  1. Set stringent permissions on the LocalSettings.php file.
    • Set chmod 600 and chown <webserver owner> (Owner read and write, no other permissions).

Once you have done the above, your wiki should be ready to use. Browse to the address you installed it to (in our example and start editing!

Field Explanation
Wiki name The name of the wiki. This will appear as the main title for meta pages, as well as throughout the interface itself. It cannot contain the term "MediaWiki' or the "#" symbol. A short word without punctuation is preferred.
Contact email This is the main administrative email address for the wiki, and usually appears as "admin@localhost". It will be displayed on some error messages and on all email notifications.
Language This drop down menu sets the language for the wiki interface. Be aware that not all localizations are complete. Unicode (UTF-8) is the default character set for all choices.
Copyright and Licenses Three choices are available:

No license metadata (not recommended for public wikis)

GNU Free Documentation License

Creative Commons Attribution Share Alike

Of these, only Creative Commons Attribution Share-Alike is Wikipedia compatible in both directions, and Attribution is in one direction.

Admin username and password Create a username and password. Administrators have the ability to block users from editing, and perform routine maintenance on the wiki.
Object Caching Two options are available:

No caching


Memcached will provide a performance boost. Provide the server addresses and ports in field provided, separated by a comma. MediaWiki will also detect Turck MMCache, eAccelerator, and APC. However, these programs are not recommended if the wiki will be running on multiple application servers.

Database host The host where the database is located. If the database is located on the same host as the web server, use "localhost".
If running MySQL using a different socket file (e.g. MySQL on localhost, using --socket=/tmp/mysocketfile), set the database host to:"localhost:/tmp/mysocketfile". Sometimes sockets are called ports. If you have a port number for your database host, follow the same syntax:"".
Database name The name of the MySQL or Postgres database you created to serve your wiki.
If you have superuser account of DB Server and will be using it on this form page then enter the name of the DB that you would like to be created for your wiki.

If you're installing on a site hosted by Yahoo, you may need to set database name to mysql.
Database username The username used for accessing your wiki database.
If you have superuser account of DB Server and will be using it on this form page then simply fill the db username that you would like to be created for your wiki. Otherwise, create the db user and ensure that the user has SELECT, INSERT, UPDATE, and DELETE permissions on the MediaWiki database. For installation the user must also have CREATE and INDEX permissions. It is strongly suggested that you do not use a superuser account since the user password is stored in plain text.
Database password The user password for accessing your wiki database.
If you have superuser account of DB Server and will be using it on this form page then just fill the db username that would like to be set on the database for your wiki. Alternately, supply a user password for the database that is already created to serve your wiki.
Superuser account / Superuser password The root database user and password, if you have it. If you don't have this password, leave it as it is. If you have the password, you may be able to skip the above stages of creating the database and user manually since this form will be able to do this for you.
Database table prefix (MySQL only) An optional prefix to prepend to the name of every table that will be created within your wiki database. If you plan to have several wikis, you might want use a prefix such as "w1_", so that all the tables associated with your first wiki will have "w1_" prepended. This allows you to install multiple wikis using the same databases by making the name unique. For example the generic name "archive" becomes "w1_archive", so that it is possible to add another MediaWiki installation without overwriting the tables.
Database port (Postgres only) This is the port number Postgres is installed at. The default value of 5432 should work for most instances.
Schema for mediawiki / Schema for tsearch2 (Postgres only) The name of the schema to put your wiki inside of. The default value of "mediawiki" should be fine for most purposes. To use more than one wiki on the same database, both this schemaname and the username should be changed, preferably to the same name to lessen confusion. The default value of "public" for tsearch2 should almost never have to be changed.
Database character set There are currently three options in this section:

Backwards-compatible UTF-8: This option is used when upgrading the MediaWiki software. Additionally, this is a good option for those users who prefer an older, more stable character set.

Experimental MySQL 4.1/5.0 UTF-8: This is a newer version of UTF-8, one that allows the user to enable Unicode support for MySQL servers 4.1 and 5.0. This version is very readable, but takes up more space.

Experimental MySQL 4.1/5.0 Binary: This version is Unicode, but is not readable.

Both experimental character sets are not well documented and may cause problems with MediaWiki configuration.

Installation errors

When you run the config script it makes various checks of your system, and tells you if there are any problems.

  • After installation if your server is redirecting to a non-existant url try and go back and hit stop before the page redirects and grab Localsettings.php.

Add the following line after $wgSitename: $wgServer =;

  • Parse error: parse error, expecting `T_STRING' in [...]\wiki\includes\Namespace.php on line 52
  • Make sure you have the appropriate version of PHP for the version of MediaWiki you are installing.
  • Attempting to connect to database server as wikiuser...failed with error [2004] Can't create TCP/IP socket (10106).
  • Often found in the internet that you should turn on named pipes in the MySQL configuration, but this did not help me (this appeared under Win2000 with MySQL 5.0)
  • "Warning: main() [function.main]: open_basedir restriction in effect. File(/ is not within the allowed path(s):"
  • Apparently the include path sometimes needs to be set. Put [ php_value include_path '/var/www/vhosts/' ] in your .htaccess file.
  • (MediaWiki 1.10.1&1.11.2) After 'Running the script' 1. The text is: 'Setup has completed, your wiki is configured.' Selecting 'your wiki' opens a new screen with the address: http://localhost:8080/mediawiki/index.php and the error '404: The page cannot be found'.
  • Path to php5isapi.dll is incorrect. In IIS manager go to web sites right click on web site go to properties then go to home directory tab and then click on configure find php in the list and then click edit and fix the path (C:\progra~1\php\php5is~1) Should be ("C:\program files\php\php5isapi.dll")
  • Warning: getrusage() is not supported in this PHP build
  • We do function_exists checks for getrusage, so if you see this error message, probably means you should file a bug.
  • Parse error: syntax error, unexpected T_LNUMBER, expecting ';' in .../wiki/includes/GlobalFunctions.php on line 75
  • Creating tables...Query "CREATE TABLE `user` ( user_id int" ..."You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=InnoDB' at line 20 (localhost)".
  • In the latest version of MySQL, TYPE= syntax has been changed to ENGINE=. Modify the entire tables.sql script.
  • Warning: domdocument::domdocument() expects at least 1 parameter, 0 given in C:\xampp\htdocs\w\includes\Preprocessor_DOM.php on line 566
    Fatal error: Call to undefined method domdocument::loadXML() in C:\xampp\htdocs\w\includes\Preprocessor_DOM.php on line 568
  • Set $wgParserConf ['preprocessorClass'] = 'Preprocessor_Hash'; in LocalSettings.php.
  • Creating tables... using MySQL 4 table defs...Query "CREATE TABLE `v_job` ( job_id int(9) unsigned NOT NULL auto_increment, job_cmd varchar(255) NOT NULL default , job_namespace int NOT NULL, job_title varchar(255) binary NOT NULL, job_params blob NOT NULL default , PRIMARY KEY job_id (job_id), KEY (job_cmd, job_namespace, job_title) ) TYPE=InnoDB " failed with error code "Specified key was too long; max key length is 1024 bytes (
  • Warning: ini_set() has been disabled for security reasons in .../includes/AutoLoader.php on line 5
  • If there is MySQL 'DB connection refused' error, it is possible the default port in Apache's PHP file ('php.ini') is incorrect.
  • Your system has a combination of PHP and libxml2 versions which is buggy and can cause hidden data corruption in MediaWiki and other web apps. Upgrade to PHP 5.2.9 or later and libxml2 2.7.3 or later! ABORTING ( for details).
    Well as the error says, either upgrade one, or downgrade one.

[TODO: This section should list all potential error messages and how to fix them. Or perhaps they should be on a separate page (depends how many there are, I guess... --HappyDog 22:05, 29 August 2007 (UTC)]

Configuration errors

[TODO: This section should list all errors that can occur when submitting the form, and how to handle them. Or perhaps on a separate page, if necessary]

  • What about the $wgSecretKey e.g.

Warning: $wgSecretKey key is insecure, generated with mt_rand(). Consider changing it manually.

a) what is this and b) what is the solution ?

Answer: It means your system doesn't support /dev/urandom so the key was generated with mt_rand(). You can manually edit the wgProxyKey field in LocalSettings.php.

  • Specified key was too long

Advanced configuration

  • See Manual:Wiki family to setup multiple instances of MediaWiki with single set of MediaWiki files.

See also