3 November 2004
Configuring MediaWiki on IIS
This entry is a repository of links and instructions covering how to install MediaWiki on a Windows 2000 IIS machine (ongoing).
- MediaWiki [Wikipedia]
- MediaWiki Handbook and installation instructions
- Documentation/usage
- Creating a New Page
- Creating a template
- Create a new page named Template:MyTemplate
- Enter your template text
- Replace dynamic text with placeholders for parameters: {{{paramName}}}
- Save
- MediaWiki Markup
- How to add categories to redirects
- How to link to category pages
- Controlling User Access
- Eliminate Script Errors
MediaWiki is the wiki used by Wikipedia.
You will need MySQL, a Web server (I'm using IIS), PHP for Windows (excellent information in the comments), and MediaWiki itself.
I used the Windows binaries for the PHP 5.0.2 zip package. The PHP 5.0.2 installer did not install the MySQL extension for PHP.
Running MediaWiki on Windows has instructions on installing MediaWiki. Once installed, I tried to run it from a subdirectory from an existing Web site. Because of the absolute file references within the PHP code, I needed to give it its own Web site.
For as much as I love the concept and application of wikis, the documentation for MediaWiki is somewhat scattered. The best place to start looking (if you're not just performing a standard search) is at the English documentation category page. That links to (I think) every relevant page.
This is a little un-intuitive. You have to first create a link to the page, then click on the link to edit the page. If the page doesn't exist, you will automatically be brought to the edit screen for that page. The editing section describes this process.
Help:Template from the MediaWiki reference
The template can be used as follows:
Because many people can't type HTML quickly or intuitively, wiki text is formatted using special markup codes that are more terse than HTML. An explanation of the markup, with examples, is available here.
I have been adding entries that are appropriate under multiple titles. Redirects are perfect for this, but I would like both titles to show up under their category pages. This is a very specific requirement, and somewhat inefficient, but it works for my needs.
To accomplish this, you need to place the category markup on the same line as the #REDIRECT markup. It cannot be above or below or it will be ignored (although I have seen it work sporadically).
Prefix the Category wikilink with a colon:
I found this trick in the Links section of the Help:Editing page.
This is described in the section Setting user rights in MediaWiki. The default settings allow anyone to view and edit the Wiki. I changed this to allow only registered users to view the Wiki, and to allow only sysops to create users and edit the Wiki. I added three lines similar to those recommended in Configuring access restrictions to your wiki, except that I set read access to "Special:Userlogin" and new account creation to sysop.
The section title Help:Logging in has subsections intended to describe restricting viewing and editing. They were empty, so I edited them to point to the user rights section listed above.
The PHP scripts had two errors in my IIS installation. The first was:
I resolved this by simply commenting out the line. The second was similar:
I resolved this one by changing the indexed value referenced from the $_SERVER array:
$baseurl = $_SERVER['REMOTE_ADDR'];
I'm not immediately sure how the values differ, but this eliminated the error with (so far) no side effects.
- Smart watch 2 posted by sstrader on 12 March 2015 at 12:38:39 PM
- Smart watch posted by sstrader on 13 September 2014 at 12:22:31 PM
- FreedomPop posted by sstrader on 8 January 2013 at 4:48:48 PM
- The HTC Flyer Android tablet posted by sstrader on 27 December 2011 at 6:06:18 PM
- Ownership posted by sstrader on 29 April 2011 at 6:09:12 PM