I’ve just spent quite a bit of time doing an upgrade for the STC MediaWiki instance. This post might be a little rambly. That reflects the mind of someone doing intense troubleshooting for hours.
For the most part, their upgrade guide was wonderful, and thorough, and had well documented some errors.
The error I was stuck on happened when I would run
update.php to migrate the database, which gave the error:
...bach conversion of user_options: PHP Fatal error: Class 'DOMDocument' not found in /var/www/html/wiki/includes/LocalisationCache.php on line 542
When accessing it via the web, I get an “HTTP Error 500 (Internal Server Error)” at every point now that I’ve upgraded the files. Looking at the log files on the server helped a lot. Apparently, the crippling error was:
PHP Fatal error: Class 'DOMDocument' not found in /var/www/html/wiki/includes/LocalisationCache.php on line 542
(Sometimes I also got errors from extensions I didn’t intend to have enabled, from copying over the old LocalSettings.php and forgetting to toggle them off.)
MediaWiki’s documentation documentation shows a similar error and the fix for it, but no dice.
sudo yum install php-xml
Adding the silly line
$wgParserConf['preprocessorClass'] = 'Preprocessor_Hash'; doesn’t do
phpinfo(); on the server it looks like xml is enabled. I don’t have access to install the package again.
And once it crashed, I had to reload the database or nothing else would work, of course. It took a good 15 minutes each time I had to.
- I could not upgrade 1.18.0 => 1.21.0
- I could not upgrade 1.18.0 => 1.20.0
- I could upgrade 1.18.0 => 1.19.0 => 1.20.0, but not all the way to 1.21.0
I don’t have one yet. It might be having a more privileged admin install that package
Casey Watts! studied neurobiology at Yale University, and he is a co-author on several neurobiology papers. He has also worked in software development for 10 years, including at Heroku. Casey is an independent author based in Washington, DC.
Casey is the author of Debugging Your Brain. This book brings together two parts of Casey's background: psychology and software development.
Debugging Your Brain (DYB) is a clear applied psychology book and a concise self-help book. Whether or not you have a technical background, you will find the software development analogies approachable and insightful. You will likely reference and re-read DYB many times, each time discovering new insights.