Manual:Running MediaWiki on Windows


 * MediaWiki User's Guide
 * Running MediaWiki

This page will give you informations about installing MediaWiki on a Microsoft Windows system.

Note: this page describes the old installation procedure and may be inaccurate.

You will need the following software:


 * Apache
 * Mysql
 * PHP
 * Mediawiki

And some serious hardware for the full Wikipedia database

Let's see how to get them and install them.

MySQL
Use the download link below, you will be pointed to a page with all mysql available versions. The one you want is "Production release" which is recommended. Actually this is MySQL 4.0 (nov. 2003).

While downloading, read the Install Guide link below.


 * Download
 * Install Guide

get & install
Install the Apache web server from http://www.apache.org/ using the latest 2.x binaries. Use the Download link below, select a mirror close to your location and download the "Win32 Binary (MSI Installer)" version. Actually this is version 2.0.48 (nov. 2003)


 * Download
 * Install Guide

configure
Modify the httpd.conf for apache. It should be located at "C:\Program Files\Apache\Apache2\conf" if you used the default installation:

LoadModule php4_module {PATH TO YOUR PHP FOLDER}/sapi/php4apache2.dll AddType application/x-httpd-php .php
 * Add these lines at the end of the block of LoadModule lines:
 * Change the DocumentRoot
 * Add the PHP types and disable PHP for all directories other than the wiki

AddType application/x-httpd-php .php .php4 .phtml AddType application/x-httpd-php-source .phps php_admin_flag engine off  php_admin_flag engine on    


 * Note: if you need PHP for other purposes, you will need to add other directory sections like that above. Do not enable the PHP engine by default.
 * It is not strictly necessary to enable the rewrite engine or include the ampersand patch
 * You will have to change c:/playpen/wiki/runtime/wiki to your script directory. Copy all the executable PHP files for MediaWiki into this directory.

Get & install
Install PHP from http://www.php.net/ using the latest windows binaries using the Zip package. Lastest version 4.3.4.


 * Download
 * Install Guide
 * Documentation in several langages

Configure
Modify php.ini so that register_globals = On

Note: this might lead to security breach, be sure you are indeed authorized making this change !

MediaWiki
From there you have two options, either get the last stable release of the mediawiki software, or get the lastest development version.

Getting Stable release
Head to http://sourceforge.net/projects/wikipedia/ press Download on the left of "MediaWiki stable release". Save on your disk and extract it to c:\mediawiki\.

Latest release
This is the development version of MediaWiki and include the last changes made by the developers. If you aren't familiar with computering fall back to stable release.

If you do not already have a CVS client, you will have to get one and install it. WinCvs is a correct CVS software under windows http://www.wincvs.org/

Get MediaWiki from the CVS archives.

Installing
Read “readme.txt” and follow instructions for setting up the LocalSettings.php and AdminSettings.php

PHP does not handle the include_once directive properly on all windows platforms and filesystems, probably due to the Windows treatment of upper and lower case in file names. You may have to comment out the include_onces in some of the .php files as follows:

Article.php:	# include_once( "CacheManager.php" ); Setup.php:	# include_once( "$IP/Title.php" ); SpecialMovepage.php:	#include_once( "LinksUpdate.php" );

Alternatively ensure that all inclusions use the same format i.e. make occurrences of ("CacheManager.php") and ( "$IP/CacheManager.php")'' consistent by using only one or other format. (I think the problem is because using the different formats is interpreted as two separate includes Mintguy 03:41, 22 Nov 2003 (UTC)).

Um ... If I "aren't familiar with computering" and played smart and got a stable release ... what would i set $IP as? The LocalSettings.php file says $IP = "/usr/local/apache/htdocs/wiki"; ....


 * I'm not sure this is an issue anymore as the latest build doesn't use $IP.

Also, you really do need iconv for some of the special pages to work, unless you comment out the relevant call in language.php:

# return iconv( "UTF-8", $wgInputEncoding, $s );


 * Did you try the iconv hack?

Reply : I beleive theres a win32 build of iconv available out there somewhere! Try looking at http://in2.php.net/iconv for more info! and a Win32 working (??) version is available at http://www.zlatkovic.com/pub/libxml/iconv-1.9.1.win32.zip

Content
All the articles of Wikipedia and their revisions are available for download at http://download.wikipedia.org/ in a MySQL dump format.

The cur only got the lastest modification of an article whereas "old" has all the earlier revisions! "cur" dump is enough for reading / mirroring wikipedia.

Save and extract the file somewhere (ex c:\temp\).

Open a command box (start -> run -> cmd.exe).

Execute: \progra~1\mysql\bin\mysql -u root -p

Enter root password for mysql At the prompt select the wikipedia database (this is, by default, named 'wikidb'): mysql> use wikidb Database changed mysql>

Then load the dump (change filename by the filename you downloaded): mysql> source c:\temp\20031104_cur_table.sql

N.b. this will take some time (several hours) if you load the full dump of the english wikipedia database!