diff --git a/config/Installer.php b/config/Installer.php
index 74859707c62..a41dd7a7a32 100644
--- a/config/Installer.php
+++ b/config/Installer.php
@@ -87,6 +87,15 @@ $ourdb['sqlite'] = array(
'serverless' => true
);
+$ourdb['mssql'] = array(
+ 'fullname' => 'Microsoft SQL Server',
+ 'havedriver' => 0,
+ 'compile' => 'sqlsrv',
+ 'bgcolor' => '#cccccc',
+ 'rootuser' => 'root',
+ 'serverless' => false
+);
+
$ourdb['ibm_db2'] = array(
'fullname' => 'DB2',
'havedriver' => 0,
@@ -910,6 +919,44 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
if( !$ok ) { continue; }
}
+ else if ( $conf->DBtype == 'mssql' ) {
+ error_reporting( E_ALL );
+ $wgSuperUser = '';
+ # # Possible connect as a superuser
+ if ( $useRoot ) {
+ $wgDBsuperuser = $conf->RootUser;
+ echo( "
Attempting to connect to database \"{$conf->DBtype}\" as superuser \"{$wgDBsuperuser}\"" );
+ $wgDatabase = $dbc->newFromParams(
+ $conf->DBserver,
+ $conf->RootUser,
+ $conf->RootPW,
+ false,
+ false,
+ 1
+ );
+ if ( !$wgDatabase->isOpen() ) {
+ echo( " error: {$wgDatabase->lastError()}\n" );
+ $errs['DBserver'] = 'Could not connect to database as superuser';
+ $errs['RootUser'] = 'Check username';
+ $errs['RootPW'] = 'and password';
+ continue;
+ }
+ $wgDatabase->initial_setup( $conf->RootPW, $conf->DBtype );
+ }
+ echo( "Attempting to connect to database \"{$wgDBname}\" as \"{$wgDBuser}\"..." );
+ $wgDatabase = $dbc->newFromParams(
+ $conf->DBserver,
+ $conf->DBuser,
+ $conf->DBpassword,
+ $conf->DBname,
+ 1
+ );
+ if ( !$wgDatabase->isOpen() ) {
+ echo( " error: {$wgDatabase->lastError()} \n" );
+ } else {
+ $myver = $wgDatabase->getServerVersion();
+ }
+ }
else if( $conf->DBtype == 'ibm_db2' ) {
if( $useRoot ) {
$db_user = $conf->RootUser;
@@ -1659,6 +1706,13 @@ if( count( $errs ) ) {
+
+
+
+
No MS SQL Server specific options at this time.
+
+
+