Any idea?
What extensions do you have installed, if any? If you have any
installed, make sure any code they told you to add to
LocalSettings.php is added near the end. My guess would be that
something is causing that file to be called before the appropriate
configuration is run (but that's just a guess).