Page 1 of 1
Session Variables: where is the breaking point?
Posted: Sun Aug 31, 2008 4:13 pm
by JAB Creations
I have been using session variables to ease development and have maybe half a dozen thus far per authenticated user. While I doubt this is excessive I am wondering what is excessive?
Re: Session Variables: where is the breaking point?
Posted: Sun Aug 31, 2008 6:16 pm
by marcth
What are you storing in the session?
A user ID integer, a locale string, maybe the users access rights are all fine. Storing long strings, arrays, objects is considered excessive.
I wouldn't use session variables to ease development. store only data you need on the vast majority of pages.
Re: Session Variables: where is the breaking point?
Posted: Sun Aug 31, 2008 6:44 pm
by JAB Creations
Good! It sounds like I'm doing the right thing then!
These all store short strings of text in my authentication header file...
Code: Select all
$_SESSION['member']
$_SESSION['member_id']
$_SESSION['member_id_file']
$_SESSION['member_name']
$_SESSION['member_status']
I'd say added up altogether maybe a hundred or two hundred bytes of text maximum.