会话在PHP中毁于一旦 [英] Session destroyed out of nowhere in PHP

查看:77
本文介绍了会话在PHP中毁于一旦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到会话被无处摧毁的问题:

I am experiencing issue with a session being destroyed out of nowhere:

session_start():无法解码会话对象。会话已被破坏

由于我已在服务器日志中抛出该问题,因此无法复制该问题。

Kind of impossible to replicate the issue since I got this thrown in my server log.

任何想法都可能是该问题的根源和/或从哪里开始,因为我变得非常罕见(几乎从来没有)。

Any ideas what could be the roots of that problem and/or where to start because I am getting that very rare (almost never).

推荐答案

当我在$ _SESSION中存储了太多内容时,在我使用表中的serialize()保存它们时,这发生了。解决方案:不要存储太多。

This happened to me when I was storing too much in $_SESSION where they were saved using serialize() in a table. Solution: don't store too much.

这篇关于会话在PHP中毁于一旦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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