David George

A year of PMWiki

Well I have bene running PMWiki on my website in conjunction with pmachine for about a year now. The site has around 500 pages. I'm currently upgrading to 2.1.12 which has meant finding all those little changes I made for my site and seeing if they are still necessary. I moved to a Wikifarm about 3 months ago and this seems to be running fine.

A busy winter of 2007 where I saw around 200K views per month. I moved to my own Gentoo Linux server over this time which made administration of pmwiki easier.

Cookbook recipes

I'm running the following recipes

  • MTBlackList?
  • SimultaneousEdits
  • seflinks - own recipe
  • pmauthuser - own recipe
  • Adit - own recipe - context sensitive and geotargetted advertising server extension for pmwiki


This is based on the AlternateNamingScheme recipe. It produces search engine friendly links. It converts the first letter of each word to upper case and adds a hyphen between each word. It also copes with accented characters (I have a lot of foreign text on my site), punctuation etc.

However I had a problem with Wikitrails when moving to the 2.1.12 version of PMWiki. If the link contained a colon ":" character the trail.php script. This is the regular expression which gave the problem and I backed out to the 2.0beta54 version which seems to work.


    if (!preg_match("/^([#*:]+) \\s* 
          | (($GroupPattern([\\/.]))?$WikiWordPattern))/x",$x,$match)) {

    /*** DBG Fix for ':' matching ***/
    /*    if (!preg_match("/^([#*:]+) \\s* 
          | (($GroupPattern([\\/.]))?$WikiWordPattern)) (.*)/x",$x,$match)) {



Authuser seemed to break my wiki in 2.1.12. Many of the pages wouldn't display although you could edit them. I really don't need this level of granularity of access control. pmauthuser is a very simple script for page editing that checks to see if the user has already been authenticated through a session variable and, optionally, a cookie, if not it checks with a table in a mysql database (in this case pMachine or ExpressionEngine).

I also made a small change to scripts.form.php to hardcode the author for edits

@@ if (isset($Author)) {

  SDVA($InputTags['e_author'], array(
  ':html' => "<input type='hidden' \$InputFormArgs />$Author",
  'name' => 'author', 'value' => $Author ));

} else {

  SDVA($InputTags['e_author'], array(
  ':html' => "<input type='text' \$InputFormArgs />",
  'name' => 'author', 'value' => $Author ));

} @@


My main problems have been to do with file permissions where my hosting provider has changed the user id/group id of the process running php. This happens rarely but is annoying never-the-less and makes me wonder whether a database hosted wiki is a better idea for hosted environments.

Evaluating pmwiki.

I'm currently running a version of pmwiki on one of my websites while I evaluate its functionality.

The principal modifications are:

  • optimizations for better search engine indexing including an alternate page naming

scheme similar to that described in AlternateNamingScheme.

  • added backup / resort functionality described in Cookbook.BackupPages
  • integration with pmachine authentication