Tuesday, March 19, 2013

Math extesion for MediaWiki


I spent quite a lot of effort to deal with Math extension for MediaWiki 1.19.2, and I have encountered the following errors: 
PHP Fatal error:  Call to undefined method TempFSFile::autocollect()
PHP Fatal error:  Call to undefined method FSFileBackend::getRootStoragePath()
This is how it finally works for (at least for me). BTW, I'm using Ubuntu 12.04.


1.First of all the HEAD in git did not work, you shall download the following version.
cd extensions
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Math.git
cd Math
git reset --hard 29a0a80e8fbb2d33507760075e4da9103439cbd9 
2.Install texvc, which generate graph for latex syntax
sudo apt-get install mediawiki-math
3.Modify LocalSettings.php:
require_once("$IP/extensions/Math/Math.php");
$wgTexvc = '/usr/bin/texvc';
4.Update your database to generate table for Math extenstion.
sudo php <your_path_to_wiki>/maintenance/update.php
5.Don't forget to check permission of folders to your wiki account. It should work.

If it still won't work, try to take a look at /var/log/apache2/error.log to see if there's any error message.
Hope this works for you : )

No comments:

Post a Comment