# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# http://www.gnu.org/copyleft/gpl.html
-error_reporting( E_ALL );
+error_reporting( E_ALL | E_STRICT );
header( "Content-type: text/html; charset=utf-8" );
@ini_set( "display_errors", true );
$ourdb[$db]['havedriver'] = 1;
}
}
-error_reporting( E_ALL );
+error_reporting( E_ALL | E_STRICT );
if (!$phpdatabases) {
print "Could not find a suitable database driver!<ul>";
$errs["DBprefix_ora"] = "Invalid table prefix";
}
-error_reporting( E_ALL );
+error_reporting( E_ALL | E_STRICT );
/**
* Initialise $wgLang and $wgContLang to something so we can
chdir( "config" );
$wgTitle = Title::newFromText( "Installation script" );
- error_reporting( E_ALL );
+ error_reporting( E_ALL | E_STRICT );
print "<li>Loading class: " . htmlspecialchars( $dbclass ) . "</li>\n";
if ( $conf->DBtype != 'sqlite' ) {
$dbc = new $dbclass;
echo( "<li>Attempting to connect to database \"" . htmlspecialchars( $wgDBname ) .
"\" as \"" . htmlspecialchars( $db_user ) . "\"..." );
$wgDatabase = $dbc->newFromParams($wgDBserver, $db_user, $db_pass, $wgDBname, 1);
+ // enable extra debug messages
+ $dbc->setMode(DatabaseIbm_db2::INSTALL_MODE);
+ $wgDatabase->setMode(DatabaseIbm_db2::INSTALL_MODE);
+
if (!$wgDatabase->isOpen()) {
print " error: " . htmlspecialchars( $wgDatabase->lastError() ) . "</li>\n";
} else {
$myver = $wgDatabase->getServerVersion();
}
} else { # not mysql
- error_reporting( E_ALL );
+ error_reporting( E_ALL | E_STRICT );
$wgSuperUser = '';
## Possible connect as a superuser
// Changed !mysql to postgres check since it seems to only apply to postgres
chdir( "config" );
print "</pre>\n";
print "<ul><li>Finished update checks.</li>\n";
+ // if tables don't yet exist
} else {
# Determine available storage engines if possible
if ( $conf->DBtype == 'mysql' && version_compare( $myver, "4.1.2", "ge" ) ) {
}
print " done.</li>\n";
+
+
+ if ($conf->DBtype == 'ibm_db2') {
+ // Now that table creation is done, make sure everything is committed
+ // Do this before doing inserts through API
+ if ($wgDatabase->lastError()) {
+ print "<li>Errors encountered during table creation -- rolled back</li>\n";
+ $wgDatabase->rollback();
+ }
+ else {
+ print "<li>MediaWiki tables successfully created</li>\n";
+ $wgDatabase->commit();
+ }
+ }
print "<li>Initializing statistics...</li>\n";
$wgDatabase->insert( 'site_stats',
$revid = $revision->insertOn( $wgDatabase );
$article->updateRevisionOn( $wgDatabase, $revision );
}
- // Now that all database work is done, make sure everything is committed
- $wgDatabase->commit();
/* Write out the config file now that all is well */
print "<li style=\"list-style: none\">\n";