MediaWiki 1.10 pretty much all working with MS Sql Server

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

MediaWiki 1.10 pretty much all working with MS Sql Server

Danny Joe Bauch
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
associative fetches.

Interlanguage links are handled by making a change to LocalSettings.php as
suggested by Brion, as is template documentation that's referenced as
{{/doc}}

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
well.

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:

  # This is a hack to work around PHP's flawed invocation of cmd.exe
  # http://news.php.net/php.internals/21796

in the function wfShellExec in GlobalFunctions.php well, that was just wrong
-- must be a PHP 4 thing. I couldn't get Batik or ImageMagick working until
after I fixed that stuff.
_______________________________________________
Wikitech-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/wikitech-l
Reply | Threaded
Open this post in threaded view
|

Re: MediaWiki 1.10 pretty much all working with MS Sql Server

Fernando Correia
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.

_______________________________________________
Wikitech-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/wikitech-l