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.

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


 * HELP!!!!!!!!!!!!!!!!!!!!!!! What is "c:/playpen/wiki/runtime/wiki"? Surely I have to alter this path to reflect my own setup, but what is its "logical" meaning? I figure it's the folder where I have the PHP wiki code, but at what depth? The CVS creates a "phase3/" folder. Should the folder I give to Apache BE this folder, or the containing one??? Please could someone explain this! -- Tarquin 11:32, 3 Feb 2004 (UTC)

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


 * 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" 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: 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