May i ask what the advantage of storing objects in session is ? Does it cause overhead ? Like should i store the most common classes like the db and auth class in a session ?
The advantage of storing an object is to keep it's properties. This way you can use values that have already been stored in the class on future pages. Therefore, I doubt there would be much advantage to store 'db' or 'auth' in a session, but I guess it really all depends on what you are doing. Currently, I am just trying to see if I can make sure a class I am writing will work when storing objects in sessions, but thus far I am unable to unserialize the sessions.
To be honest, I guess it really isn't that different than storing them in a file, since they technically are stored in a file. Supposedly you don't have to manually serialize or unserialize them if you set the initial session variable with session_register(), so that might be a plus. Unfortunately I have been unable to get that to work. Actually, I have been unable to get a session to unserialize manually either.
I do not know if storing an object in a session causes anymore overhead than storing them in a file or database. If I was to guess, storing them in a database might be less taxing.
-- Jason Giangrande <[EMAIL PROTECTED]> http://www.giangrande.org http://www.dogsiview.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php