Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Troubleshooting › Session logging out after about 20 minutes
- This topic has 4 replies, 2 voices, and was last updated 15 years ago by
Gary.
-
AuthorPosts
-
March 18, 2011 at 7:47 pm #2989
Gary
MemberHi.
Im finding im getting logged out after about 20 minutes of a member logging in to my members area.
Is there any way to change the session timeout value or something as this is far too quick.
Thank you.
Gary
March 19, 2011 at 1:05 am #30393amin007
ParticipantSimply check the “Remember Me” Checkbox when you log in.
March 19, 2011 at 5:24 pm #30394Gary
MemberWhat about if my customer doesnt check ‘remember me’? Is there any way I can do this in the code as thats not really a solution?
March 20, 2011 at 12:56 am #30395amin007
ParticipantThe issue is with the server. Basically, PHP sessions are prematurely getting cleared on your server this is why I suggested the workaround.
Anyway, here is more details ..
The login value is stored in the PHP Session and PHP sessions are suppose to survive a lot longer than 20 minutes. No idea why the PHP session on your server is prematurely getting cleared. I am not an expert on server setup but you may want to check the following things:
– Your session timeout value is set to a decent number (session timeout is declared in php.ini)
– Is the shared host running some other type of automated job to do some server-side cleanup outside of php’s own session garbage collection routines?
– What version of php is the shared host running? There are quite a few bug reports for older versions of PHP and session issues.
– Is apache timing out?
I have seen this on one of my customers sites once and that one turned out that shared host system was cleaning sessions out of the /tmp every ten minutes or so!!
March 20, 2011 at 9:59 am #30396Gary
MemberThat would make more sense and definately save having to expect the user to check the box. I have been into my php.ini file and changed the session timeout value so I will see if that makes a difference. Thank you for getting back.
Update: Got the web host to fix the PHP session and now its fine. Thanks.
Gary
-
AuthorPosts
- You must be logged in to reply to this topic.