Sunday, March 18, 2012

Planet M.U.L.E. Error MuleException wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)

Have you ever gotten an error like this?

Planet M.U.L.E. Error
wrong ELF class: ELFCLASS32 (Possible cause: 
architecture word width mismatch)
Please run to start the game.

Well, do not worry, here is the solution.  The reason you are getting this error is that is trying to use a 32 bit library instead of a 64 bit library like your machine probably requires.  I got this error when launching the game M.U.L.E. for the first time on a 64 bit linux box. The only thing you need to do to fix this error is change the LD_LIBRAY_PATH in your file as follows.

The old line looked like this:

so change it to:
export LD_LIBRARY_PATH=.:/usr/lib/jvm/java-7-openjdk/jre/lib/amd64

Your library path may be different. In order to find what LD_LIBRARY_PATH to change to, I ran the following command:
 $ locate jre/lib | grep 64

This assumes that you have recently run the updatedb command, and have the openjdk installed, but it shows all of the files in the java runtime library that mule needs.  Your java runtime library may be on a different path.

Hope that helps.

Thursday, March 08, 2012

Block anonymous users from seeing media wiki history

It looks like a patch to the install will be necessary for making it such that anonymous users do not get to see histories.  And while the  Other restrictions section of the mediawiki page, as of today, confirms this fact, that page does not make it clear how to actually prevent histories from showing up for anonymous users.

But have no fear, as of mediawiki 1.18.1, the following easy changes to two files have worked pretty well for me at preventing casual anonymous users from seeing the histories of pages:

1) Change the beginning of the history function in the includes/HistoryPage.php file so that it looks like this:
function history() {
    global $wgOut, $wgRequest, $wgScript, $wgUser;

    if ( ! $wgUser->isAllowed('edit') ) {
        $wgOut->addWikiMsg( 'nohistory' );
        wfProfileOut( __METHOD__ );

2) Change the beginning of the insertDiffHist function in the includes/ChangesList.php file so that it looks like this:
public function insertDiffHist( &$s, &$rc, $unpatrolled ) {

    global $wgUser;

    if ( ! $wgUser->isAllowed('edit') ) {
        return null;
This should prevent anonymous users from being able to see the histories of pages. For bonus points in the comments, let us know how badly this will affect our search engine rankings.