I have PHP 5.6 x86 installed on Windows 7 to C:\PHP. IIS is successfully running PHP and MediaWiki when it's configured to use MariaDB. I'm trying to get it to work with MS SQL Server and it's not showing up as an option when I install MediaWiki from scratch.

I've added and enabled php_mssql.dll, php_pdo_sqlsrv_54_nts.dll, php_pdo_sqlsrv_54_ts.dll, php_sqlsrv_54_nts.dll, and php_sqlsrv_54_ts.dll to C:\PHP\ext and MediaWiki still won't see it as a DB option. I added ntwdblib.dll to C:\PHP. I've been trying things from all sorts of different sites with no progress.

How can I configure a MS Sql Server PHP Driver for a fresh install of MediaWiki to use?

I have found that in phpinfo() under "Configure Command" it does have a flag for --without-mssql. Do I have to compile it myself to change that?

EDIT: Screenshot of SQL Server Support

Microsoft SQL Server listed in the supported database list

It has a link for how to compile PHP with SQL Server support, but I'd rather not open that can of worms unless absolutely necessary. Are there easier alternatives?


It turns out that the SQL Server driver only supports PHP 5.4 (there's also a preview for 5.5) and I was using PHP 5.6. Rolling back to PHP 5.4 and enabling the php_pdo_sqlsrv_54_nts.dll and php_sqlsrv_54_nts.dll extensions worked.


SQL Server is not supported by Mediawiki according to the Installation requirements [1]. The only way to provide such support is to write your own adapter for SQL Server.

[1] - https://www.mediawiki.org/wiki/Manual:Installation_requirements#Database_server

  • Tomorrow I'll add a screenshot where MediaWiki itself is telling me it supports Sql Server. Nov 13 '14 at 1:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.