Fatal exception of type MWException
Asked Answered
A

2

15

I recently installed MediaWiki in localhost on Debian 7 System. But after the installation, I got the exception Fatal exception of type MWException. I reviewed all reported bugs, but they do not apply to me.

PHP 5.4.4 phpmyaddmin....

Asperity answered 24/7, 2013 at 2:37 Comment(4)
mediawiki.org/wiki/Manual:How_to_debugFootgear
Thanks... But I already done this steps... And the issiues persist...Asperity
"$wgShowExceptionDetails Enable more details (like a stack trace) to be shown on the "Fatal error" page." We would need to know more than just "Fatal exception of type MWException".Footgear
Thanks! I appreciate your help... but I believe that was an installation error... I reinstall and all is function propertly... A lot of thanks...Asperity
D
29

As written in the comments, edit your LocalSettings.php file and add this line at the very end:

$wgShowExceptionDetails = true;

Try reloading the page that gives you that error. You're likely to see what's called a backtrace... here is my example:

#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}

The first line is the one that stopped the execution, causing the exception. If you can identify the problem (in my case it's the LocalisationUpdate extension) it can be very easy to fix. Again, in my case it's enough to open again LocalSettings.php and comment out or delete the line:

require_once( "$IP/extensions/LocalisationUpdate/LocalisationUpdate.php" );
Distended answered 14/10, 2013 at 10:3 Comment(0)
F
2

There could be a problem with caching, try to use

$wgMainCacheType = CACHE_NONE;
Frangipane answered 10/6, 2014 at 10:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.