修改php.ini
session.gc_probability = 1
#php session存活時間(秒)
; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
; http://php.net/session.gc-maxlifetime
session.gc_maxlifetime = 1440
session.gc_divisor = 100
存檔後重新啟動apache和php