Manual:How to debug/Login problems

Login or session problems (such as not being able to log in, immediately getting logged out, randomly getting logged out, not being able to edit due to "loss of session data" errors) can be caused by a large variety of things, which makes debugging them hard.

When investigating or reporting errors, here are a few tips.

For users

 * If the problem is being unable to login because of "There seems to be a problem with your login session..." errors, clearing all cookies for that site usually helps.
 * When making a bug report, always include what browser (and what version of it) you are using, whether you are using it in incognito mode, and whether you are using non-default privacy/security settings (such as "block third-party cookies").
 * If possible, include a precise date and time of when you experienced the problem, so it can be correlated with system logs.
 * You don't have to do an in-depth investigation just to file a bug report, but if you do want to, here are some kinds of information that are usually helpful:
 * Does it persist after clearing cookies for the wiki domain? When logging in using incognito mode?  When logging in with a different kind of browser?
 * If you use any ad blockers or browser privacy add-ons, are they blocking anything? Does it work if you turn them off?
 * Does it affect multiple user accounts, or just one?
 * Does the "remember me" flag make any difference? (Clear cookies before attempts.)
 * If the problems are happening on a Wikimedia wiki, try logging in on another wiki, preferably one that does not share a second-level domain name (so if the problem happens on xy.wikipedia.org, try for example xy.wiktionary.org).
 * If the above information is not enough to diagnose the issue (which is usually the case), you might be asked to get detailed debug data. For that, you need to capture the relevant HTTP requests and responses (i.e. visiting the login page + submitting the login form + the resulting redirect; if the wiki uses single sign-on then all the requests to  and   as well). This can be done by using the Network tab in the Developer Tools of your web browser (more information: Firefox; Internet Explorer, Chrome and Chromium, Safari). Dumping to a HAR file is an easy way to log all required data.
 * Note that this includes security-sensitive data (such as your session ID); when sharing the information as part of a bug report, you need to use a private paste. You are encouraged to remove your password from the report (in the case of a HAR file, you can just open it as a text file, search for the password and replace it with something else) and to log out and log back in afterwards.

For site administrators

 * Check what session backend is being used, and make sure it works (data is actually persisted between requests). The most safe configuration is  .  If you're unsure about how it's configured, add this setting at the end of your LocalSettings.php.
 * Be sure is not set to 1 or true, otherwise PHP sessions will overwrite MediaWiki sessions.
 * Be sure is set to an empty string. It marks sessions as invalid if configured incorrectly.
 * If set, be sure and  are correct.
 * If is set to true, your webserver must be served with HTTPS.
 * Ensure the hostnames match in MediaWiki and Apache . For example, for the domain   and the web server located at  :
 * And:
 * If you use an ancient MediaWiki version (older than 1.27), check the value of ; if it is false, test that your PHP session handling is working (e.g. that  is writable).
 * If you file a bug report:
 * Report what MediaWiki version you use and what session providers you are using (the value of ).
 * Check your logs for relevant records, especially the,  ,  ,   channels.
 * For certain types of cache you can get more information by setting debug mode:
 * Please do not reuse old bug reports unless you are sure it's the same cause. There are lots of reports about past issues, and the while symptoms will usually look vaguely similar to yours (there are only so many ways login can fail) the cause is likely to be different.
 * For certain types of cache you can get more information by setting debug mode:
 * Please do not reuse old bug reports unless you are sure it's the same cause. There are lots of reports about past issues, and the while symptoms will usually look vaguely similar to yours (there are only so many ways login can fail) the cause is likely to be different.
 * Please do not reuse old bug reports unless you are sure it's the same cause. There are lots of reports about past issues, and the while symptoms will usually look vaguely similar to yours (there are only so many ways login can fail) the cause is likely to be different.