-
FAQ
- Forum Search
- Community
- Online Manual
- Support Helpers of the Month
- Function Database
sessionGC
Description
Session "Garbage Collection" function - deletes old sessions based on the 'databaseSession_lifetime' setting and the passed value (max lifetime is in minutes). Only used for database-driven sessions.
Syntax
bool sessionGC (int $max_lifetime)
Parameter $max_lifetime
Expected type: Integer
Description: The maximum lifetime for sessions, in minutes (see notes)
Return value
Expected type: Boolean
Description: Returns true if the query was successful (regardless of how much was deleted). Dies with an error otherwise
Notes
- Used as the 6th (and final) callback argument for session_set_save_handler
- Only used when database-driven sessions are enabled
- Checks the 'databaseSession_lifetime' setting
- $max_lifetime is only used if the above setting is empty, greater than 1440 [24 hours] or less than or equal to $max_lifetime
- Will not delete sessions less than an hour old, regardless of settings and max_lifetime value
Advertisement:- Help | Terms and Rules | Go Up ▲
- Copyright © 2022 Simple Machines. All Rights Reserved.
- Page created in 0.130 seconds with 13 queries.
- Forum Search