$error = testMemcachedServer($server);
        if ($error) {
            $errs["MCServers"] = $error;
            break;
        }
    }
} else {
    if ($conf->Shm == 'memcached') {
        $errs["MCServers"] = "Please specify at least one server if you wish to use memcached";
    }
}
/* default values for installation */
$conf->Email = importRequest("Email", "email_enabled");
$conf->Emailuser = importRequest("Emailuser", "emailuser_enabled");
$conf->Enotif = importRequest("Enotif", "enotif_allpages");
$conf->Eauthent = importRequest("Eauthent", "eauthent_enabled");
if ($conf->posted && 0 == count($errs)) {
    do {
        /* So we can 'continue' to end prematurely */
        $conf->Root = $conf->RootPW != "";
        /* Load up the settings and get installin' */
        $local = writeLocalSettings($conf);
        echo "<li style=\"list-style: none\">\n";
        echo "<p><b>Generating configuration file...</b></p>\n";
        echo "</li>\n";
        $wgCommandLineMode = false;
        chdir("..");
        $ok = eval($local);
        if ($ok === false) {
            dieout("<p>Errors in generated configuration; " . "most likely due to a bug in the installer... " . "Config file was: </p>" . "<pre>" . htmlspecialchars($local) . "</pre>");
        }
Ejemplo n.º 2
0
        if ($error) {
            $errs["MCServers"] = $error;
            break;
        }
    }
} else {
    if ($conf->Shm == 'memcached') {
        $errs["MCServers"] = "Please specify at least one server if you wish to use memcached";
    }
}
/* default values for installation */
$conf->Email = importRequest("Email", "email_enabled");
$conf->Emailuser = importRequest("Emailuser", "emailuser_enabled");
$conf->Enotif = importRequest("Enotif", "enotif_allpages");
$conf->Eauthent = importRequest("Eauthent", "eauthent_enabled");
$conf->Editor = importRequest("Editor", "editor_enabled");
if ($conf->posted && 0 == count($errs)) {
    do {
        /* So we can 'continue' to end prematurely */
        $conf->Root = $conf->RootPW != "";
        /* Load up the settings and get installin' */
        $local = writeLocalSettings($conf);
        $wgCommandLineMode = false;
        chdir("..");
        eval($local);
        $wgDBadminuser = "******";
        $wgDBadminpassword = $conf->RootPW;
        $wgDBprefix = $conf->DBprefix;
        $wgCommandLineMode = true;
        $wgUseDatabaseMessages = false;
        /* FIXME: For database failure */