dstobkpm908182 2012-04-18 06:32
浏览 170

在PHP中大约10分钟后$ _SESSION为空

We currently use $_SESSION for our current session data (ie, login, current state, etc, etc). And the script worked perfectly fine for ages, but we changed from an old PHP4 server to a PHP5 server. Now after a certain amount of time (roughly 10 mins, but it doesn't seem to be consistent) the $_SESSION gets wiped! (:O!). But it appears as if the PHPSESSID is still residing in the cookies, so the cookie doesn't seem to expire...

My servers current settings are: (phpinfo)

http://jsfiddle.net/6DjcC/1/

What could be causing this? I'm sure its something small I've totally over looked and is the primary cause.

My session variables:

Directive   Local Value Master Value
session.auto_start  Off Off
session.bug_compat_42   On  On
session.bug_compat_warn On  On
session.cache_expire    15400   15400
session.cache_limiter   nocache nocache
session.cookie_domain   no value    no value
session.cookie_httponly Off Off
session.cookie_lifetime 0   0
session.cookie_path /   /
session.cookie_secure   Off Off
session.entropy_file    /dev/urandom    /dev/urandom
session.entropy_length  0   0
session.gc_divisor  100 100
session.gc_maxlifetime  154000  154000
session.gc_probability  0   0
session.hash_bits_per_character 5   5
session.hash_function   0   0
session.name    PHPSESSID   PHPSESSID
session.referer_check   no value    no value
session.save_handler    files   files
session.save_path   /var/lib/php    /var/lib/php
session.serialize_handler   php php
session.use_cookies On  On
session.use_only_cookies    On  On
session.use_trans_sid   0   0

I am using the following "non-standard extensions":

-X-Debug

-Suhosin

-eAccelerator

  • 写回答

2条回答 默认 最新

  • duange051858 2012-04-18 07:15
    关注

    Are you on a shared hosting? If yes, try to change session.save_path: Could session_start() in php be messing up my users sessions lengths?

    评论

报告相同问题?

悬赏问题

  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了