NYCPHP Meetup

NYPHP.org

[nycphp-talk] Cannot unset $_POST during logout

max max at neuropunks.org
Wed Jul 20 12:46:50 EDT 2005


well, storing session data in the db was an attractive idea, but I decided not to do it because the $_SESSION array is too tiny for this app, and the app wont grow in the $_SESSION[user] sense. There are other things in the app tied to $_SESSION[user][uid] and when I need to access those things, i do a db lookup using the uid.
I would also like to avoid recoding some of this to make everything get stored in the db.
Also, wouldnt this introduce at least slightly more overhead? I would assume you would have to query db on pretty much every page that user goes through to make sure they have enough access to access this page, as well as check their session id, etc.
Ive seen alot of discussion advocating db backend for session storage, but I am still not convinced its a good idea.
But you do have a point, I would be able to track vars pretty well. I use print_r and echo and those type things now to see values for $_POST and $_SESSION, and they come up empty once i call print_r after processing $_GET logout request.
This really looks like a browser caching issue, but I do have those no-cache header statements, and the code makes that check and it still sucks : /

max

On Wed, Jul 20, 2005 at 12:25:12PM -0400, Cliff Hirsch wrote:
> How do you access the table from each new thread? Can a thread access
> other session data or do you store the table in a database?
> 
> >I like to store corresponding sessions in table, tracking the user id,
> session id, last >active timestamp, if they clicked "logout," etc.  This
> was done in-part to prevent
> >multiple account logins, but if you have something like that to test
> against, you can
> >determine if the user has logged out before processing any other data.
> 
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
> 
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
> 



More information about the talk mailing list