Manual:Config script/ja

ウェブサーバにあるMediaWikiを更新またはインストールしたら、まず最初にMediaWikiに同梱されている設定スクリプトを実行して基本的な設定を完了させる必要があります. このスクリプトを使ってウィキを立ち上げ実行するために必要な情報をMediaWikiに伝えることができます.

MediaWiki インストール フォームを開く
以下の事例では、ウェブサイトが にあり、これが物理的にはサーバの にあることを想定しています. あなたの状況に応じた適切な場所で使うには内容を適宜修正する必要があるでしょう.


 * 1) ウェブブラウザでウィキのメインページにアクセスします. ページはあなたがウェブアクセス可能なフォルダの中にインストールしたMediaWikiの で、通常は になります（例： 、MediaWikiが にインストールされていると想定した場合）. （Short URLを使いたいなら をウィキルートディレクトリに指定しないでください））. 
 * 2) インストールしたMediaWikiのバージョンと「Please set up the wiki first.」のリンクがあるページが表示されるでしょう. このリンクをクリックし、設定スクリプトの実行を開始してください. 参考までに（リンク先へ直接アクセスしたいなら）、ウィキの ディレクトリにアクセスしてください（上記の例だと になります）.
 * 3) スクリプトが何らかの設定エラーを表示したら設定を続行することはできません. 以下にある、表示されたエラーメッセージについての詳細情報をみて、どう対処すべきなのかを確認してください.
 * 4) すべてのテストに通過したら、MediaWikiが要求する必要事項を入力するフォームが表示されるでしょう.
 * 1) すべてのテストに通過したら、MediaWikiが要求する必要事項を入力するフォームが表示されるでしょう.

Using the config script
Follow the instructions on the form to fill in the required entries (refer to the following table if you're uncertain what to enter) and after that click on the "Install MediaWiki!" button. The script will now populate the database and write a configuration file.

After the setup script has finished running successfully, a file called  is created in the mw-config (config for older versions) directory. This file contains all the information needed by MediaWiki to run. Since it stores the specified database user's password in plain text, it is strongly suggested that you create a wiki specific database account (i.e. not root). (see Database username in the table below)


 * 1) Move this file to the main wiki directory (if you installed MediaWiki to  , move it there).
 * 2) Set stringent permissions on the   file.
 * 3) * Set chmod 600 and chown (Owner read and write, no other permissions).

上記の作業が終わったら、ウィキを使用する準備はできています. インストールされたディレクトリ ( http://www.example.com/wiki/ ) にアクセスして編集を始めてください.

インストールエラー
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:


 * 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(/convertLinks.inc) is not within the allowed path(s):"
 * Apparently the include path sometimes needs to be set. Put [ php_value include_path '/var/www/vhosts/yourhost.com/httpdocs/pathtowiki'  ] in you .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.

Fatal error: Call to undefined method domdocument::loadXML in C:\xampp\htdocs\w\includes\Preprocessor_DOM.php on line 568
 * Warning: domdocument::domdocument expects at least 1 parameter, 0 given in C:\xampp\htdocs\w\includes\Preprocessor_DOM.php on line 566
 * Set  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 (h41mysql79.secureserver.net)


 * 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 (http://bugs.php.net/bug.php?id=45996 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)]

設定エラー
[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]

Warning: $wgSecretKey key is insecure, generated with mt_rand. Consider changing it manually.
 * What about the $wgSecretKey e.g.

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
 * Answer

高度な設定

 * Manual:$wgEnableUploads to enable image/files upload.
 * Also see Manual:Short URL for having more user friendly url to article pages.
 * See Manual:Configuring MediaWiki for links to more advanced configuration.
 * See Manual:Wiki family to setup multiple instances of MediaWiki with single set of MediaWiki files.

関連項目

 * Manual about Errors/Symptoms in MediaWiki