- This topic has 4 replies, 2 voices, and was last updated 13 years, 8 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember Troubleshooting › Session logging out after about 20 minutes
Hi.
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
Simply check the “Remember Me” Checkbox when you log in.
What 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?
The 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!!
That 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