Tag Archives: apache

Quick MediaWiki setup on Windows

Just posting steps needed to get up and running quickly with a minimal installation on a local machine.

Downloads

  • httpd-2.2.22-win32
  • Visual C++ 2010 SP1 Redistributable Package x86
  • php-5.3.9-Win32-VC9-x86
  • MediaWiki 1.18.2

Notes

  • Apache only officially distributes source, so get Windows binaries from Apache Lounge
    • Those are built with VC10, so need the C++ 2010 Redistrubutable package
  • Must use thread safe version of PHP for use as Apache module. The non-TS one is for use as CGI.
  • Need to use the right PHP version for what Apache was compiled with. Apache VC10 works with any previous.
  • Apache 2.4.1 did not seem to work with PHP 5.4.0
  • PHP SQLite extension is not core from 5.4 on – must get from PECL but where to get a built DLL?

Apache

In httpd.conf:

  • ServerAdmin
  • ServerName localhost:80
  • AddDefaultCharset UTF-8
  • Add index.php to DirectoryIndex

PHP module setup:

LoadModule php5_module "c:/PHP/php5apache2_2.dll"

# only for files where .php is at the end
<FilesMatch \.php$>
  SetHandler application/x-httpd-php
</FilesMatch>

# configure the path to php.ini
PHPIniDir "C:/PHP"

PHP

  • Make extension_dir an absolute path (did not work with relative)
  • Enable extensions:
    • php_pdo_sqlite.dll
    • php_sqlite.dll
  • default_charset = “UTF-8”

MediaWiki

  • Extract to directory in Apache web root
  • Backup – stop Apache then copy the SQLite file. Or export XML usingĀ tool
  • Extensions
    • SyntaxHighlight_GeSHi
      • Enable dashed border for all option, 1.25em Chrome font size fix
      • When making changes to MediaWiki:Geshi.css, need to comment out the require in LocalSettings.php, refresh, then uncomment.

Config:

$wgLogo = "$wgStylePath/common/images/mediawiki.png";
$wgEnableMWSuggest = true;
Advertisements