在 MediaWiki 中将会话存储从文件更改为 MySQL

发布于 2024-11-30 11:41:31 字数 440 浏览 3 评论 0原文

我正在将我们公司 MediaWiki 从单一服务器迁移到集群环境。现有的基于文件的会话存储对于单个服务器来说很好,但显然不适合集群。

为了解决这个问题,我希望使用我们现有的 MySQL 数据库服务器之一来处理会话管理,但我遇到的唯一一篇文章是关于 新的 MediaWiki 安装

我在 LocalSettings.php 中设置了 $wgSessionHandler 但这没有效果。

有人对此有建议/经验吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

苯莒 2024-12-07 11:41:31

这可能不是您正在寻找的答案,但我自己也面临着这个问题。
在尝试做正确的事情™几个小时后,我最终屈服了,只是将会话放在共享存储上。

因此,如果您负担得起,性能明智,并且有一些可用的共享存储或可以轻松创建一些共享存储,我只能建议仅指向 PHP 的 session.save_path 到共享存储并省去麻烦。

这是最简单的出路。 ;-)

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. ;-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文