kristophjunge / docker-mediawiki

Dockerized MediaWiki running under Nginx and PHP-FPM. Based on the official PHP7 image. Packaged with VisualEditor plugin and Parsoid service.
MIT License
62 stars 41 forks source link

$wgDBprefix not used during install an in wiki #9

Closed Cypris2010 closed 6 years ago

Cypris2010 commented 7 years ago

I think I found a bug or the documentation is not correct.

It's said the default value of MEDIAWIKI_DB_TYPE is 'mysql', but thats not true. The default value in LocalSettings.php is ''. For that reason the wiki does not look for the MEDIAWIKI_DB_PREFIX envirevent variable.

# MySQL specific settings
if (getenv('MEDIAWIKI_DB_TYPE') == 'mysql') {
    // Cache sessions in database
    $wgSessionCacheType = CACHE_DB;

    if (getenv('MEDIAWIKI_DB_PREFIX') != '') {
        $wgDBprefix = getenv('MEDIAWIKI_DB_PREFIX');
    }

    if (getenv('MEDIAWIKI_DB_TABLE_OPTIONS') != '') {
        $wgDBTableOptions = getenv('MEDIAWIKI_DB_TABLE_OPTIONS');
    }
}

This is solvable by using the MEDIAWIKI_DB_TYPE variable.

The next problem I don't understand.

The installer seems to ignore the MEDIAWIKI_DB_PREFIX as well, even with MEDIAWIKI_DB_TYPE set to mysql. I cant find the sourcecode for this. Can anybody help?

kristophjunge commented 6 years ago

Issue with MEDIAWIKI_DB_TYPE

At some point i decided to not to have own default values that might differ from MediaWiki's default values. I had not updated the documentation accordingly. I have done that now.

Issue with MEDIAWIKI_DB_PREFIX

The environment value was not used in the install.sh script. I fixed that.