3
How to adjust the time to expire $_SESSION?
attempts..
Include in top of files (worked on offline localhost)
ini_set('session.gc_maxlifetime', 3600); // 1 hora
ini_set('session.cookie_lifetime', 3600);
session_start();
And also
session_set_cookie_params(3600); // 1 hora
session_start();
Change direct on php.ini
session.gc_maxlifetime = 3600
session.cookie_lifetime = 3600
but none of the methods worked on the Online server
doubt... when destroying Session the variables set in it will be lost, and the user will have to redo the process if it has started and stopped until the time expires, this?
– smigol
Of course. When the time expires, the session is destroyed.
– Lollipop
cool @Lollipop, this code I should put in the file that checks whether the user is logged in or not?
– smigol
I updated, based on your comment.
– Lollipop