MediaWiki 1.10 pretty much all working with MS Sql Server
After another week or so of work and a little helpful advice from Brion
Vibber, I have MediaWiki 1.10 (modules pulled from the SVN trunk and added
to the 1.93 baseliine) pretty much all working on Microsoft SQL Server 2000.
I won't try to get my stuff merged in until after the 1.10 release passes,
since I suspect the core developers will have their hands full until then.
The problems identified in my 15 March post have been fixed.
In particular, the "pagers" are working. To get this to work, I had to add
three or four lines to the PHP database driver I'm using (ADOdb). By
default, the ADOdb driver does not allow moving backward through a record
set, even though it uses a static, client-side cursor (at least when
connected to SQL Server) perfectly capable of doing do. I also had to wrap
the database query from the IndexPager class (Pager.php) with calls to set
the fetch mode to associative and then back to the default numeric. Unlike
the MySQL driver, ADOdb does not do both at the same time. Almost all of the
MediaWiki PHP code works fine with numeric fetches, but the pagers need
Interlanguage links are handled by making a change to LocalSettings.php as
suggested by Brion, as is template documentation that's referenced as
I discovered that the template processing problems I was trying to debug are
known, and I didn't introduce them. HTML generated by templates is not
always valid, and therefore MediaWiki doesn't correctly produce WikiPedia
articles without HTML tidy. Getting HTML tidy to work on my server was more
frustrating than it had to be, since the external tidy won't work in
conjunction with the MediaWiki as it's currently set up on Windows (tidy and
MediaWiki engage in a deadly embrace) and the API to use the internal tidy
has changed from the time that section of the MediaWiki code was written.
Help pages from PHP.net weren't as helpful as they could be, since they
mostly document the 4.3 version instead of the 5.1+ version -- and I'm using
a pretty recent PHP release. Fortunately, the 5.1 syntax is reasonably close
to 4.3, albeit now using bona fide classes. It's working.
The tables seem to be mostly behaving themselves now. In particular,
redirects are now being populated, recentchanges being recorded and (as of
today) logging seems to work as it should. This last one took a little
longer, because my logging table lacked a column (log_id) that was missing
from the tables.sql that I used as a baseline -- but that gets referenced in
queries later on. I threw in an IDENTITY column named log_id and all is
Very few changes had to be made outside of the DatabaseADOB (extends
Database) class. Here and there, things were getting over-quoted (i.e.
putting quotes around the result of calling DatabaseADODB::addQuotes) and
the stuff right after the comment:
Re: MediaWiki 1.10 pretty much all working with MS Sql Server
I'd like to praise your thorough work on this. I'm sure it will help
expand MediaWiki's presence on intranets. I know I'd rather run it on
SQL Server than on MySQL. It would also be simpler to do so, because
we already have SQL Server as our main database.