Session Variables: where is the breaking point?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Session Variables: where is the breaking point?

Post 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?
marcth
Forum Contributor
Posts: 142
Joined: Mon Aug 25, 2008 8:16 am

Re: Session Variables: where is the breaking point?

Post 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.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Session Variables: where is the breaking point?

Post by JAB Creations »

Good! It sounds like I'm doing the right thing then! :mrgreen:

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.
Post Reply