是否可以设置 session.gc_maxlifetime >65535 秒 [英] Is it possible to set session.gc_maxlifetime > 65535 seconds
问题描述
目前我的 session.gc_maxlifetime
设置为默认值,即 1440 秒.
Currently my session.gc_maxlifetime
is set to default, thus 1440 seconds.
我想将 maxlifetime
设置为一个月,4*7*24*60*60 秒.但是,我在 php.net 上读到最大session.gc_maxlifetime
的值为 65535.
I would like to set the maxlifetime
to a month, 4*7*24*60*60 seconds. However, I've read on php.net that the maximum value of session.gc_maxlifetime
is 65535.
是否不可能将我的 maxlifetime
设置为超过 65535 秒?
Is it therefor impossible to set my maxlifetime
to more than 65535 seconds?
推荐答案
是的,如果你做自会话处理程序
yes it is possible, if you do self session handler
那么 PHP garbabe 收集器将不会处理您的会话
then PHP garbabe collector will not handle your sessions
session_set_save_handler()
参见 http://cz1.php.net/manual/en/function.session-set-save-handler.php
这篇关于是否可以设置 session.gc_maxlifetime >65535 秒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!