User:Seb35/MediaWiki Archaeology

Today I took the challenge to make MediaWiki working with every version, from 1.28 (alpha) to 1.1, and test my wikifarm extension with old versions. The difficulty is: my laptop is a modern Linux with 64bit architecture with modern softwares, so the environment is 10 year more modern than first MediaWiki versions. I won the challenge :)

Below are some tricks, if you ever need to run an old version. In addition of the challenge, it can be useful if you want to test an old extension.

My web server is nginx 1.6.2; I used the module fastcgi to run PHP, and I used pretty URLs with  (no "/wiki/" subdirectory).

PHP versions
The more you go to the past, the older becomes PHP. Here are the versions I used; I used the more recent working version (e.g. if a MW version works with PHP 5.6 and 7.0, the result is 7.0).

The standard version in my Debian-based GNU/Linux is 5.6. I added the repository from Debian Stretch to obtain PHP 7.0.

I compiled PHP 5.2.17 from sources. If you ever need my configure, it was. I had issues with DOM and SimpleXML extensions, and the with-libdir is needed to locate the mysqlclient library. To execute the FastCGI without the FPM I was accustomed, I copied the script from nginx.com.

I also compiled PHP 5.1.6, 5.0.5 and 4.4.9 with similar configure (without SQLite for 5.0.5 and 4.4.9). These are not needed since MediaWiki works with at least PHP 5.2, but it was for fun. If you have as much issues as I had with the mysqlclient library, I modified the configure for PHP 5.1 iirc to include my specific path.

Note PHP 5.0 and 4.4 don’t work with 64bits architectures, and 4.4 doesn’t like MySQL > 4.1 because authentication methods changed in MySQL 4.1 (so MW cannot connect to a MySQL 5.5 server).

MediaWiki
I created separated databases for each MW installation, with a dedicated MySQL user. Then I always installed MW from the web interface. No extensions were available in the  directory, and only MonoBook and Vector were available in   (added in new versions).

No special comment for recent versions (>= 1.19).

For MediaWiki 1.13-1.20 with PHP 5.6, Special:Version was a blank page, and I had to do the following change to restore it:
 * includes/MagicWord.php, function getBaseRegex
 * - $group = "(?P<{$i}_{$name}>" . preg_quote( $syn, '/' ) . ')';
 * + $group = "(?P" . preg_quote( $syn, '/' ) . ')';

Another strange thing in these version: the main page (and others) is blank when I access the wiki directly, but contains its normal text when I access from the farm. Didn’t search why.

With MediaWiki 1.2-1.12, I had to change the file  (or  ) to replace "TYPE=InnoDB/HEAP/MyISAM" by "ENGINE=InnoDB/HEAD/MyISAM".

For MediaWiki <= 1.4 (about), you have to give the MySQL root password during the installation, else the installation doesn’t finish.

MediaWiki 1.1 is a bit harder to install because you need to follow the instructions of the file INSTALL, and understand  script will copy the files in another (final) directory. For this version (only), you also need to enable  in PHP.

Links

 * MediaWiki release notes
 * PHP 5 release notes