Is it possible to set session.gc_maxlifetime > 65535 seconds

拜拜、爱过 提交于 2020-05-26 19:00:00

问题


Currently my session.gc_maxlifetime is set to default, thus 1440 seconds.

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.

Is it therefor impossible to set my maxlifetime to more than 65535 seconds?


回答1:


yes it is possible, if you do self session handler

then PHP garbabe collector will not handle your sessions

session_set_save_handler()

see http://cz1.php.net/manual/en/function.session-set-save-handler.php



来源:https://stackoverflow.com/questions/22803632/is-it-possible-to-set-session-gc-maxlifetime-65535-seconds

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!