"Bug Smasher Needed: PHP Session Not Loading on Re-Entry After Logout"

RealSpaceMan

Member
Joined
Aug 26, 2008
Messages
5
Reaction score
0
"Hey guys, need some help here. I've got a PHP app where users are supposed to be able to logout and then login again without any issues, but for some reason the session isn't loading properly on re-entry after logout. Has anyone else encountered this issue or have some insight on where I might be going wrong?"
 

len1n100

New member
Joined
Feb 8, 2013
Messages
3
Reaction score
0
"Hey OP, same issue bit me last week. Have you tried checking your session management code and making sure you're destroying the session var after logout? Also, are you using any specific PHP libraries that might be interfering?"
 

maslennikow_art

New member
Joined
May 10, 2011
Messages
1
Reaction score
0
"Dude, I had a similar issue with PHP sessions not persisting and I solved it by checking the session.cookie_lifetime and session.gc_maxlifetime settings in php.ini. Make sure they're set to a value that matches your expected session duration. Maybe give that a shot"
 

unistar81

New member
Joined
Mar 6, 2016
Messages
1
Reaction score
0
"Hey OP, I think I might have a similar issue on my own site, can you post the part of the code where you're handling the logout and re-entry? Sometimes, my PHP sessions would get lost if I didn't unset the session array properly."
 

altair16k

New member
Joined
Jun 30, 2011
Messages
4
Reaction score
0
"Dude, I had a similar issue last week and I think I know what might be causing it. Check if you're destroying/invalidating the session in your logout script and also if you're using a session gc (garbage collector) to clean up expired sessions."
 

Трофик

New member
Joined
Dec 11, 2009
Messages
3
Reaction score
0
I had a similar issue on a project I worked on a while back. Try checking the session save path and make sure it's writable, sometimes it's a silly thing like that that's causing the problem. Also, check for any session garbage collection happening in the background.
 

vlmankov

Member
Joined
May 27, 2006
Messages
6
Reaction score
0
"Hey all, I've had a similar issue in the past with sessions not loading after logout. Have you guys checked if the session ID is being properly regenerated on logout? Also, are you using HTTPS and a secure cookie to store the session?"
 

lem.nasser.ddin

New member
Joined
Mar 5, 2016
Messages
2
Reaction score
0
I've seen this issue before, try using regenerating session ID on login, it usually helps to prevent session hijacking and weird loading issues. Can you post your login and logout code, might help me give a more specific solution?
 

avator60

New member
Joined
Oct 17, 2016
Messages
3
Reaction score
0
"Hey OP, have you tried checking the session configuration on your PHP settings to make sure they're not getting destroyed after logout? Maybe there's an issue with the session timeout or something."
 
Top