phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

phpbb_session_keys messed up? 19 records for one user


 
Search this topic... | Search General Support... | Search Box
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Author Message
qspy
Board Member



Joined: 03 Nov 2009

Posts: 10



PostPosted: Wed Nov 04, 2009 5:02 am 
Post subject: phpbb_session_keys messed up? 19 records for one user

I think my phpbb code messing up phpbb_session_keys table, why? Look at this:

mysql> select * from phpbb_sessions_keys where user_id = 2 order by last_login desc;
+----------------------------------+---------+----------+------------+
| key_id | user_id | last_ip | last_login |
+----------------------------------+---------+----------+------------+
| 28cf4ab9632db5a6f84d52572 | 2 | 5135 | 1257291451 |
| e3c9020fdf49a30541421934f | 2 | 53c6 | 1257274146 |
| bebec695e9221c8005a4aca5f | 2 | 530c | 1257262937 |
| 4e4d0f40a338c5cc0773ec4ac | 2 | 50e4 | 1257255349 |
| 367580580e70da5f8c1213772 | 2 | 53ca | 1256831145 |
| d3f1df5d5398b94d63e628ba3 | 2 | 530f | 1254095110 |
| 6c63e56d3b3f473bc63f8633d | 2 | 530b | 1253698288 |
| a3dec5770b486220db8617f64 | 2 | 53ab | 1253657725 |
| c3826cce520183d145e3417c1 | 2 | 5fd3 | 1253452680 |
| 74410af18c892485150549f6 | 2 | 5317 | 1253191978 |
| c58748305badbc2580f856072f | 2 | 5735 | 1253084264 |
| 222af99f90cd6f23477a8904b | 2 | 53a1 | 1252634900 |
| 5fd7b1a946b32daf832f59644 | 2 | 530b | 1251971618 |
| 72d82eb32b4674ba09745e823 | 2 | 5381 | 1251764347 |
| 446bf5d1d3e2a07586d91ca38 | 2 | 5380 | 1250229353 |
| 897e73b3f4496cd299206acf7 | 2 | 5310 | 1249439746 |
| 80d4600d0354ab64b8e2b675 | 2 | 5343 | 1249429279 |
| e66b8b898eb4d523ccaebead4 | 2 | 5c13 | 1249420256 |
| decd5a4a0f0ad3feb8315086c | 2 | 531b | 1247638278 |
+----------------------------------+---------+----------+------------+

(shortened values to not show real ip/real session id)

this isn't normal right? i mean one user should have one session_key...
should i write script, that will delete every record except one with biggest last_login time for each user_id?

my guess is session_keys deletion code is broken
mysql> select count(*) from phpbb_sessions_keys;
+----------+
| count(*) |
+----------+
| 2294693 |
+----------+

icon_razz.gif
Back to top
Merri
Board Member



Joined: 02 Feb 2009

Posts: 63
Location: Kanta-Häme


flag
PostPosted: Wed Nov 04, 2009 7:31 am 
Post subject: Re: phpbb_session_keys messed up? 19 records for one user

One user may have multiple logins from different browsers or computers. However, I too have noticed that they tend to pile up, there are a lot of logins from 2008 to some users (including myself). In the other hand I do not know whether last_login tells you the actual last login time or just the first time the person "permanently" logged in.
_________________
Comboa Twitter
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Wed Nov 04, 2009 5:31 pm 
Post subject: Re: phpbb_session_keys messed up? 19 records for one user

A session key is only valid for one IP address. So if the user is logging in from different remote addresses with auto-login, then distinct keys will be created.
_________________
Moof!
Lincoln's Tomb, Oak Ridge Cemetery, Springfield ILMac 512K BlogMac GUI
Back to top
Merri
Board Member



Joined: 02 Feb 2009

Posts: 63
Location: Kanta-Häme


flag
PostPosted: Wed Nov 04, 2009 7:08 pm 
Post subject: Re: phpbb_session_keys messed up? 19 records for one user

I guess it would make sense to add auto-removal for sessions that haven't been used at all for a month or so?
_________________
Comboa Twitter
Back to top
Dog Cow
Board Member



Joined: 18 Nov 2008

Posts: 378


flag
PostPosted: Thu Nov 05, 2009 2:45 pm 
Post subject: Re: phpbb_session_keys messed up? 19 records for one user

Merri wrote:
I guess it would make sense to add auto-removal for sessions that haven't been used at all for a month or so?

That's a board_config option. See the General Settings admin panel.

_________________
Moof!
Lincoln's Tomb, Oak Ridge Cemetery, Springfield ILMac 512K BlogMac GUI
Back to top
Display posts from previous:   
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0290 seconds using 15 queries. (SQL 0.0023 Parse 0.0009 Other 0.0258)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo