I am using the following $wgConf for my 3 wikis:
<?PHP
$wgLocalDatabases = array(
'mainwiki',
'networkwiki',
'projectwiki',
);
$wgConf->wikis = $wgLocalDatabases;
$wgConf->suffixes = array( 'wiki' );
$wgConf->localVHosts = array( 'localhost' );
/*require_once "$IP/InitialiseSettings.php";*/
function efGetSiteParams( $conf, $wiki ) {
$site = null;
$lang = null;
foreach( $conf->suffixes as $suffix ) {
if ( substr( $wiki, -strlen( $suffix ) ) == $suffix ) {
$site = $suffix;
$lang = substr( $wiki, 0, -strlen( $suffix ) );
break;
}
}
return array(
'suffix' => $site,
'lang' => $lang,
'params' => array(
'lang' => $lang,
'site' => $site,
'wiki' => $wiki,
),
'tags' => array(),
);
}
$wgBlockAllowsUTEdit=true;
$wgBlockCIDRLimit=array('IPv4'=>0, 'IPv6'=>0);
require_once("$IP/extensions/CentralAuth/CentralAuth.php");
$wgConf->suffixes = $wgLocalDatabases;
$wgConf->siteParamsCallback = 'efGetSiteParams';
$wgConf->extractAllGlobals( $wgDBname );
$wgConf->settings=array(
#Required for CentralAuth
'+wgGroupPermissions'=>array(
'default'=>array(
'*'=>array(
'edit'=>false,
),
),
),
'wgServer' => array(
'default'=>'http://192.168.2.100',
),
'wgCanonicalServer'=>array(
'default'=>'http://192.168.2.100',
),
'wgArticlePath'=>array(
'default'=>"{$wgScript}?title=$1",
),
'wgLocalInterwiki'=>array(
'default'=>'$lang',
),
'wgSitename'=>array(
'mainwiki'=>"Jasper's Wiki",
'networkwiki'=>"Jasper's Network",
'projectwiki'=>"Jasper's Projects",
),
#Other configuration settings
'+wgBlockCIDRLimit'=>array(
'mainwiki'=>array(
'IPv4'=>0,
'IPv6'=>0,
),
'default'=>array(
'IPv4'=>0,
'IPv6'=>0,
),
),
'+wgBlockAllowsUTEdit'=>array(
'mainwiki'=>true,
'default'=>true,
),
);
$wgCentralAuthDatabase='centralauth';
require_once("$IP/extensions/CheckUser/CheckUser.php");
$wgShowExceptionDetails=true;
# (Not installed yet) require_once("$IP/extensions/GlobalUserrrights/GlobalUserrights.php");
require_once($IP.'/extensions/GlobalBlocking/GlobalBlocking.php');
$wgShowExceptionDetails=true;
?>
First of all, my $wgConf settings do not seem to apply. My wikis all just use their local $wgGroupPermissions and other settings and don't read what I put into $wgConf. CentralAuth's user unification worked properly, but I get a 500 Internal Server Error whenever I try to view my own global user info. Note that I am using Windows IIS, and my version of PHP somehow is unable to run anything in CLI. I am on a private network so this is not accessible to the public. Mainwiki (my "meta") is located at the /wiki subdirectory, Projectwiki at /projectwiki, and networkwiki at /networkwiki. The above is a Commonsettings.php included on the first line of the Localsettings.php file of every wiki. Databases have been set up correctly, and I have not done the migration scripts because I have only one user. What is wrong with my setup?Jasper Deng 00:37, 21 December 2011 (UTC)