Home > Backend Development > PHP Tutorial > php session不自动销毁,该怎么解决

php session不自动销毁,该怎么解决

WBOY
Release: 2016-06-13 12:51:53
Original
852 people have browsed it

php session不自动销毁

服务器环境:win2003 + IIS + php5.3

php session 配置如下:

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 Off Off
session.bug_compat_warn Off Off
session.cache_expire 180 180
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 no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
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 D:\phptemp D:\phptemp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies On On
session.use_trans_sid 0 0

现在的问题是用户登录后就能一直在线,临时目录下的session文件不能自动销毁,越积越多,最后把服务器拖垮了。
奇怪的是同样的配置在另外一台服务器上就没问题,应该是系统设置方面的问题,不涉及到程序开发,请有运维经验的高人指点?


------解决方案--------------------
关注一下期待高手来回答。
------解决方案--------------------
你改变了 session.save_path 还能垃圾回收吗?
我的经验是 session.save_path 为操作系统的临时目录时(c:\windows\temp)才能回收
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template