} try { $wgDatabase = new DatabaseSqlite(false, false, false, $wgDBname, 1); } catch (MWException $ex) { echo 'error: ' . htmlspecialchars($ex->getMessage()) . "</li>\n"; continue; } if (!$wgDatabase->isOpen()) { print "error: " . htmlspecialchars($wgDatabase->lastError()) . "</li>\n"; $errs['SQLiteDataDir'] = 'Could not connect to database'; continue; } else { $myver = $wgDatabase->getServerVersion(); } if (is_callable(array($wgDatabase, 'initial_setup'))) { $wgDatabase->initial_setup('', $wgDBname); } echo "ok</li>\n"; } elseif ($conf->DBtype == 'oracle') { echo "<li>Attempting to connect to database \"" . htmlspecialchars($wgDBname) . "\"</li>"; $old_error_level = error_reporting(); wfSuppressWarnings(); $wgDatabase = $dbc->newFromParams('DUMMY', $wgDBuser, $wgDBpassword, $wgDBname, 1); wfRestoreWarnings(); if (!$wgDatabase->isOpen()) { $ok = true; echo "<li>Connect failed.</li>"; if ($useRoot) { if (ini_get('oci8.privileged_connect') === false) { echo "<li>Privileged connect disabled, please set oci8.privileged_connect or run maintenance/ora/user.sql script manually prior to continuing.</li>"; $ok = false;