Session management in 1 database on shared hosting
Posted: Sun Nov 12, 2006 5:51 am
A quick question that just crossed my mind. Having a shared hosting package, I've been storing my sessions in a database for some time now. Works great. The thing is that in every domain pointer's database I created a new table called "_sessions".
Now I thought: why not create one central database that stores all sessions for every domain on my account?
Advantages? No need to create that same "_sessions"-table over and again. More generic setup. Keeps databases 'cleaner'.
Disadvantages?
(As far as I know, by default all the sessions on shared hosting are stored in the tmp/ directory so I guess storing all my sessions in one database should be no problem. Or I am overlooking something here?)
Now I thought: why not create one central database that stores all sessions for every domain on my account?
Advantages? No need to create that same "_sessions"-table over and again. More generic setup. Keeps databases 'cleaner'.
Disadvantages?
(As far as I know, by default all the sessions on shared hosting are stored in the tmp/ directory so I guess storing all my sessions in one database should be no problem. Or I am overlooking something here?)