Manual:Running MediaWiki on Windows

<-MediaWiki User's Guide

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

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 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    
 * 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
 * It is not strictly necessary to enable the rewrite engine or include the ampersand patch

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\.

Lastest 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)).


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

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" also have all the revisions ! "cur" dump is enough for reading / mirroring wikipedia.

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

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

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

Enter root password for mysql At the prompt select the wikipedia database: mysql> use wikipedia Database changed mysql>

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

Have fun