14

我最近在 Debian 7 系统的 localhost 中安装了 MediaWiki。但安装后,我得到了异常Fatal exception of type MWException。我查看了所有报告的错误,但它们不适用于我。

PHP 5.4.4 phpmyaddmin....

4

2 回答 2

28

正如评论中所写,编辑您的LocalSettings.php文件并在最后添加这一行:

$wgShowExceptionDetails = true;

尝试重新加载出现该错误的页面。您可能会看到所谓的回溯……这是我的示例:

#0 /Users/user/www/extensions/LocalisationUpdate/LocalisationUpdate.class.php(553): LocalisationUpdate::filename('it')
#1 /Users/user/www/extensions/LocalisationUpdate/LocalisationUpdate.class.php(36): LocalisationUpdate::readFile('it')
#2 [internal function]: LocalisationUpdate::onRecache(Object(LocalisationCache), 'it', Array)
#3 /Users/user/www/includes/Hooks.php(255): call_user_func_array('LocalisationUpd...', Array)
#4 /Users/user/www/includes/GlobalFunctions.php(3883): Hooks::run('LocalisationCac...', Array)
#5 /Users/user/www/includes/cache/LocalisationCache.php(796): wfRunHooks('LocalisationCac...', Array)
#6 /Users/user/www/includes/cache/LocalisationCache.php(426): LocalisationCache->recache('it')
#7 /Users/user/www/includes/cache/LocalisationCache.php(310): LocalisationCache->initLanguage('it')
#8 /Users/user/www/includes/cache/LocalisationCache.php(245): LocalisationCache->loadItem('it', 'fallback')
#9 /Users/user/www/languages/Language.php(3978): LocalisationCache->getItem('it', 'fallback')
#10 /Users/user/www/languages/Language.php(230): Language::getFallbacksFor('it')
#11 /Users/user/www/languages/Language.php(189): Language::newFromCode('it')
#12 /Users/user/www/includes/Setup.php(497): Language::factory('it')
#13 /Users/user/www/includes/WebStart.php(161): require_once('/Users/user/3d...')
#14 /Users/user/www/index.php(55): require('/Users/user/3d...')
#15 {main}

第一行是停止执行的那一行,导致异常。如果您能确定问题(在我的情况下是 LocalisationUpdate 扩展),则很容易解决。同样,在我的情况下,再次打开LocalSettings.php并注释掉或删除该行就足够了:

require_once( "$IP/extensions/LocalisationUpdate/LocalisationUpdate.php" );
于 2013-10-14T10:03:45.037 回答
2

缓存可能有问题,尝试使用

$wgMainCacheType = CACHE_NONE;
于 2014-06-10T10:37:16.473 回答