MySQL is the recommended DBMS. PostgreSQL or SQLite can also be used, but
support for them is somewhat less mature. There is experimental support for IBM
-DB2 and Microsoft SQL Server.
+DB2 and Oracle.
The supported versions are:
* MySQL 5.0.2 or later
* PostgreSQL 8.3 or later
-* SQLite 3
+* SQLite 3.3.7 or later
* Oracle 9.0.1 or later
== Upgrading ==
*/
public abstract function isCompiled();
+ /**
+ * Checks for installation prerequisites other than those checked by isCompiled()
+ * @since 1.19
+ * @return Status
+ */
+ public function checkPrerequisites() {
+ return Status::newGood();
+ }
+
/**
* Get HTML for a web form that configures this database. Configuration
* at this time should be the minimum needed to connect and test
If you are on shared hosting, ask your hosting provider to install a suitable database driver.
If you compiled PHP yourself, reconfigure it with a database client enabled, for example using <code>./configure --with-mysql</code>.
If you installed PHP from a Debian or Ubuntu package, then you also need install the php5-mysql module.',
+ 'config-outdated-sqlite' => "'''Warning''': you have SQLite $1, which is lower than minimum required version $2. SQLite will be unavailable.",
'config-no-fts3' => "'''Warning''': SQLite is compiled without the [//sqlite.org/fts3.html FTS3 module], search features will be unavailable on this backend.",
'config-register-globals' => "'''Warning: PHP's <code>[http://php.net/register_globals register_globals]</code> option is enabled.'''
'''Disable it if you can.'''
$allNames[] = wfMsg( "config-type-$name" );
}
- if ( !$this->getVar( '_CompiledDBs' ) ) {
+ // cache initially available databases to make sure that everything will be displayed correctly
+ // after a refresh on env checks page
+ $databases = $this->getVar( '_CompiledDBs-preFilter' );
+ if ( !$databases ) {
+ $databases = $this->getVar( '_CompiledDBs' );
+ $this->setVar( '_CompiledDBs-preFilter', $databases );
+ }
+
+ $databases = array_flip ( $databases );
+ foreach ( array_keys( $databases ) as $db ) {
+ $installer = $this->getDBInstaller( $db );
+ $status = $installer->checkPrerequisites();
+ if ( !$status->isGood() ) {
+ $this->showStatusMessage( $status );
+ }
+ if ( !$status->isOK() ) {
+ unset( $databases[$db] );
+ }
+ }
+ $databases = array_flip( $databases );
+ if ( !$databases ) {
$this->showError( 'config-no-db', $wgLang->commaList( $allNames ) );
// @todo FIXME: This only works for the web installer!
return false;
}
-
- // Check for FTS3 full-text search module
- $sqlite = $this->getDBInstaller( 'sqlite' );
- if ( $sqlite->isCompiled() ) {
- if( DatabaseSqlite::getFulltextSearchModule() != 'FTS3' ) {
- $this->showMessage( 'config-no-fts3' );
- }
- }
+ $this->setVar( '_CompiledDBs', $databases );
}
/**
* @since 1.17
*/
class SqliteInstaller extends DatabaseInstaller {
+ const MINIMUM_VERSION = '3.3.7';
/**
* @var DatabaseSqlite
return self::checkExtension( 'pdo_sqlite' );
}
+ /**
+ *
+ * @return Status:
+ */
+ public function checkPrerequisites() {
+ $result = Status::newGood();
+ // Bail out if SQLite is too old
+ $db = new DatabaseSqliteStandalone( ':memory:' );
+ if ( version_compare( $db->getServerVersion(), self::MINIMUM_VERSION, '<' ) ) {
+ $result->fatal( 'config-outdated-sqlite', $db->getServerVersion(), self::MINIMUM_VERSION );
+ }
+ // Check for FTS3 full-text search module
+ if( DatabaseSqlite::getFulltextSearchModule() != 'FTS3' ) {
+ $result->warning( 'config-no-fts3' );
+ }
+ return $result;
+ }
+
public function getGlobalDefaults() {
if ( isset( $_SERVER['DOCUMENT_ROOT'] ) ) {
$path = str_replace(