Created
January 26, 2019 20:19
-
-
Save anibalardid/edec562c190e9080355a17063c385f63 to your computer and use it in GitHub Desktop.
Change session expiration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ini_set('session.cookie_lifetime', 60 * 60 * 24 * 7); // 7 day cookie lifetime | |
ini_set('session.gc_maxlifetime', 60 * 60 * 24 * 7); | |
ini_set('session.save_path', '/home/yoursite/sessions'); | |
session_start(); | |
setcookie('PHPSESSID','any id' , any time); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment