简体   繁体   中英

Change session storage from file to MySQL in MediaWiki

I am in the process of moving our companies MediaWiki from a single server to a clustered environment. The existing file based session storage was fine with the single server, but clearly not for the cluster.

To address this I'm looking to use one of our existing MySQL database servers to handle session management but the only article I've come across is for a new MediaWiki installation .

I set $wgSessionHandler in LocalSettings.php but that had no effect.

Anyone have advice/experience with this?

This might not be the answer you're looking for, but I was just facing this issue myself. After trying to Do The Right Thing™ for some hours, I finally gave in and just put the sessions on shared storage.

So, if you can afford to, performance wise, and have some shared storage available or can easily create some, I can only recommend just pointing PHP's session.save_path to shared storage and save yourself the trouble.

It's the easy way out. ;-)

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