Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't log in to mediawiki: canceled as a precaution against session hijacking?

  1. I'm using a private mediawiki hosted on AWS EC2 instance for years
  2. I thought something gone wrong with some extension, specifically stopping in the middle of math rendering, so I tried to reload the page with Google Chrome browser's cache were all erased.
  3. Right after that, I can't log in seeing this message "There seems to be a problem with your login session; this action has been canceled as a precaution against session hijacking. Go back to the previous page, reload that page and then try again."

I tried, 1. restart apache server 2. tried MediaWiki sessions and cookies not working on multi-server behind CloudFlare 3. tried Mediawiki, can't login after password change 4. tried "go in your LocalSettings.php and at the end add the following code of line :session_save_path("tmp");Create a folder "tmp" in your wiki installation directory. give rights 777 (permissions)" as in https://www.mediawiki.org/wiki/Topic:Pjby0sdeg3e60rfy 5. checked the server's hard disk storage, but it has free space of way more than 3.5gb.

How do I fix this and is there any way of disabling this really helpful "PRECAUTION" feature?

like image 811
HBS Avatar asked Sep 14 '25 17:09

HBS


1 Answers

Adding $wgSessionCacheType = CACHE_DB; to LocalSettings.php solves the problem. No need to change $wgMainCacheType.

This works, without the "precaution against session hijacking" error:

$wgMainCacheType = CACHE_ACCEL;
$wgSessionCacheType = CACHE_DB;
like image 121
jgrocha Avatar answered Sep 16 '25 08:09

jgrocha