Recently, I deployed OpenSSO as a web single sign on service for a number of web servers, one of which was running MediaWiki. I haven’t yet written a SAML2 plugin for MediaWiki, so I am running an OpenSSO web agent for Apache, with the LDAP plugin doing auto-authentication.
After deploying the web agent, MediaWiki started parsing things incorrectly. Wiki-syntax like:
== Test == == Test2 == === Test 3 ===
Was being corrupted, and turning into something like:
== Test ==== Test2 ===== Test3 ===
I traced it down to a conflict between the OpenSSO web agent and php-xml (dom.so specifically). I’m not sure exactly what the issue is, but removing the php-xml package from Red Hat Enterprise Linux 5 (RHEL 5) solved the parsing problem. Unfortunately, some MediaWiki extensions, like ImageMap, require php-xml.
I was able to fix the issue in MediaWiki’s configuration by telling the parser to use plain PHP arrays for temporary storage instead of PHP’s DOM. I did this by putting the following into LocalSettings.php:
$wgParserConf = array( 'class' => 'Parser', 'preprocessorClass' => 'Preprocessor_Hash', );
If anyone has an idea on a better way to fix this, I’m all ears. I’d like to not have a nasty workaround like this.
Related posts:
- New OpenSSO authentication plugin for MediaWiki
- Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 2)
- Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 1)
- Using the LDAP Authentication Plugin for MediaWiki – The Basics (Part 3)
- Semi-anonymous users in MediaWiki using the LDAP Authentication extension








