MediaWiki – multiple installations

Back to the multiple installtions of wiki. Here is what I did.
In installing the second wiki, lets say wiki2. I symbol linked everything from the first installation, except file LocalSettings.php and directory config. I Created it’s own config directory. Then installed the second mediawiki using different database.

The benefits are you do not need to keep many shared files/directories.
Another insteresting thing when playing with mediawiki. How about just two installations sharing same database. NO PROBLEM. You gained a lot by sharing many common files/directories as well as database. I checked that mediawiki databse diffentiates the data from two places pretty well using unique Ids so that if you browse one wiki it will not show up wiki you configured in another place. Nice feature.
However, if your wiki tends to be really big, you may choose to install it in a separate database though.

Footer

Community building: a wiki or a forum?

If you are installing midiawiki the first time, you may end up installing several just like me. The rich features of mediawiki impressed me and I decided to move some of my forums to mediawiki. Why? You may ask? I think wiki is promoting a more interactive community than forums. How many of you are fed up with a long long forums posts – you serached through it trying to find a final answser. You may just jump into the last several posts, but they are coments like “Thank you”, “That really helps”, “Please check another thread at bla bla bla”, etc. You just wanted to get the final answer to this issue in the thread but was overwelmed by many long unrelated posts. In wiki, you are always presnted with the final anser from the community, all the changes are kept in the “History” if you are insterested. Neat.

In forums, you may easily read who said what, when. In wiki, you always see the most recent version of the current discussion, the “who” and “when” and even “what” are located in “history” section. (“history” kept all versions of the pages)

Footer

MediaWiki Installation Tricks regarding MySql database versions

When I installed mediawiki version 1.5 the first time and was prompted for database features, I used the default option – backward compatibility. _ I later guess that it used features of MySql prior to version 4.1. That caused the problem:

First, after installation, you get SQL error 1271 when hitting pages like “Recent Changes”. I later looked into the codes and found the issue. Basically, if you have the query like this when your default character set of MySql is utf-8 you’ll get this SQL error.

select * from some_table where some_col =’test’

The reason is, some_col is utf-8 collation, while string literal ‘test’ was treated as collation latin1. So the comparison failed, prior to MySql version 4.

I got around the pronblem by inserting something like this in includes/Database.php in mediawiki installation source codes:

select * from some_table where convert(some_col using latin1) =’test’

SQL error disappeared. However, after that, I had the second problem. My link and categories all show red, regradless if the linked pages/categories were defined or not.

I suspect that is the same issue with the first as comparison failed due to collation conflicts. I ddin’t want to spend too much on it so I want ahaed to reinstall it and this time I chosed database MySql version 4/5 (NOT backward compatiable).

All issues were resolved and mediawiki worked like a charm.

Footer