简体   繁体   中英

Mediawiki, can't login after password change

I'm using MediaWiki 1.27.0 on Ubuntu 14.04

I haven't set up email on the server yet, so I was going to reset a users password using the maintenance/changePassword.php script that mediawiki provides.

When I ran their command

php maintenance/changePassword.php --conf=/var/www/html/LocalSettings.php --user=myuser --password=newPassword

It said Password set for myuser

Now no one can log in, and everyone gets the same error of

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'm at a loss as to how to fix this. I find other's who have had this error with an older version of mediawiki, and the next version of mediawiki seems to have fixed their problem. But obviously, that can't fix this issue.

Any help is appreciated.


What I've tried

I looked through the user accounts in the database to make sure their change password script hadn't done anything odd, and it all looks fine.

I tried this crazy solution that said you should create a tmp directory in the root of mediawiki and give it 777 access. I tried that, just for giggles, then deleted the directory.

EDIT

This isn't the solution. After restarting apache2, I was able to login, but the same problem happened again. I'm not sure what happened yet, but this definitely didn't resolve the problem more than just temporarily.


I was going to delete this question, but I think it's only a matter of time before it actually helps some noob like me.

The instructions on manually resetting the mediawiki passwords without email don't say that you should restart apache once you have run the script, but this seems to be required. That should have been my first step, but I started freaking out, and everything I knew to do went straight out the window.

So, if you manually reset passwords on mediawiki, and you get this error, restart apache. Actually, if you ever get an error for any reason....this is probably a good thing to try anyway.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM