某些用户的会话变量消失(drupal) [英] Session variables disappear for some users (drupal)

查看:100
本文介绍了某些用户的会话变量消失(drupal)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站有这个问题困扰着我几个月。我不断收到各地,但现在我似乎没有能够找到这样的方式,所以我想,为什么不解决根本问题?

I have this problem in my site that haunts me for months. I keep getting around it, but now I seem not to be able to find such a way, so I figured why not tackle the root problem?

我的根本问题是,有些(不总是)会话数据消失了我的一些用户。我知道他们中的大多数肯定启用了cookies。我想也许这是一个会话到期的事情,但我不认为是这样。我设置过期很长时间,加上他们的会话被擦除的用户量是太该死的高...

My root problem is that sometimes (not always) session data disappears for some of my users. I know most of them for sure have cookies enabled. I thought maybe it's a session expiry thing, but I don't think that's it. I set the expiration for very long, plus the amount of users that their session gets erased is just too damn high...

我使用的Drupal 6。

I'm using drupal 6.

有什么建议?

推荐答案

几样东西,你可能要检查

Few things, that you might want to check


  1. 您的会话垃圾收集器如何配置?请验证PHP设置:session.gc_maxlifetime,session.gc_divisor,session.session.gc_probability。这只是一个猜测,但也许GC正在删除您的数据。

  2. 数据是否从会话表中消失?如果使用默认的会话处理程序的Drupal,$ _SESSION表的数据存储在在序列化形式的会话表的会话列。

  3. 如果数据从数据库中灭亡,如果你能重复您的开发服务器上的问题,您还可以启用查询日志记录数据库(MySQL的服务器配置,看的 http://dev.mysql.com/doc/refman/5.1/en/query-log.html 了解更多详细信息)。启用devel模块后,您可以使用注释(包括功能执行查询的信息)来装饰(devel模块设置)您的查询。这可能会帮助您找到问题。 生产环境中的DONT TRY

  4. 有些问题可能是由一个启用的模块引起的,这削弱了$ _SESSION表。尝试找到所有$ _SESSION发生在您启用的模块代码,特别是在写上下文。一些正则表达式将有助于此任务。

  1. How are your session garbage collector configured? Please verify PHP settings: session.gc_maxlifetime, session.gc_divisor, session.session.gc_probability. It's only a guess, but maybe GC is deleting your data.
  2. Does data disappears from sessions table? If you use default session handler for Drupal, data of $_SESSION table is stored at session column of sessions table at serialized form.
  3. If data perishes from database, and if you are able to repeat problem on your development server, you can also enable queries logging for your database (at mysql server configuration, see http://dev.mysql.com/doc/refman/5.1/en/query-log.html for more details). With devel module enabled, you can decorate (devel module settings) your queries with comment including info about function executing query. This may help you to find problem. DONT TRY ON production environment
  4. Sometimes problem can be caused by one of enabled modules, which cripples your $_SESSION table. Try to find all $_SESSION occurences at your enabled modules code, especialy at write context. Some regular expression will help at this task.

这篇关于某些用户的会话变量消失(drupal)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆