How long do sessions last?

Ahh, figured it out with the help of this post.
Turns out InfinityFree sets the default timer for the ‘PHPSESSID’ cookie at 24 hours, and to change it you override the cookie using the session_set_cookie_params(); function and set the expiry timer to 0 causing it to destroy when the browser closes.

session_set_cookie_params(0);
6 Likes