Difference between revisions of "Wikimedia Issues"

From SlugWiki
Jump to: navigation, search
m
m
Line 1: Line 1:
While nice to look at and mostly easy to use, mediawiki also has it's shares of issues.  [[About:Slugwiki Slugwiki]]'s solution to some of these issues might be useful for others in a similar position.
+
While nice to look at and mostly easy to use, mediawiki also has it's shares of issues.  [[About:Slugwiki | Slugwiki]]'s solution to some of these issues might be useful for others in a similar position.
  
 
==Moving Servers==
 
==Moving Servers==

Revision as of 20:19, 30 May 2006

While nice to look at and mostly easy to use, mediawiki also has it's shares of issues. Slugwiki's solution to some of these issues might be useful for others in a similar position.

Moving Servers

The debian box that formerly hosted the wiki ran mysql 4.1, whereas this OpenBSD box is running mysql 4.0. Turns out, when using mysqldump there is an option to export to the old syntax; this proved invaluable, as I was having no luck manually editing the sqldump to conform to 4.0. To do this, try

mysqldump --compatible=mysql40

After importing this data into the new mysql database, you'll need to install the wiki software; Rob opted to install the same version that was running on the old machine, 1.4.10. When performing this install, the config script will yell about a duplicate key with value 0; this is because mysqldump didn't indicate that the id columns should be auto_increment. Set this property for the table the config script complains about, and the first time you edit a page you'll have to do it again on another table. To know which (I can't remember now), modify LocalSettings.php (the wiki config file) and set $wgShowSQLErrors and then try to edit any file. Make this table auto_increment as well. If the images aren't showing up, it's necessary to make sure the new images directory has write access.

The thumbnails might be in the wrong places (mine were, for some reason) so I deleted the images/thumb directory, recreated it, chmod 777'd it, and let the wiki regenerate the thumbnails for me. To upgrade versions, download the 1.5.X release (any 1.5 should do; Rob chose the latest), and once that's complete go on to 1.6.

Thumbnails

If you have ImageMagick installed and enabled, the wiki builds image thumbnails as needed, and hashes them in the images/thumb directory. If your wiki is not doing this, make sure images/thumb is writable by the server.

Odd URIs

Mediawiki uses the machine's hostname for some URIs. Looking at the source gives this information away; two calls get the hostname via:

$hostname = $_SERVER['SERVER_NAME'];  //GlobalFunctions.php
$wgServerName = $_SERVER['SERVER_NAME'];   //DefaultSettings.php

This means that, for your wiki to work correctly, your system's hostname needs to be set appropriately! This information is read from /etc/myname on OpenBSD, and can also be set with hostname. Apache needs to be restarted before PHP notices the change.