Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session Mgmt in MySQL

Status
Not open for further replies.

hmerrill

Programmer
Dec 4, 2000
473
US
I adapted Ying Zhang's Tip ( on using MySQL to manage Session information - I created a "session_mysql.php" script that contains functions sess_open, sess_read, sess_write, etc. I have it working, but I don't understand how session_destroy and sess_gc(garbage collection) work - when I invoke session_destroy() in my php application, the "data" column for that session is cleared, but the row for that session remains(is not DELETE'd). I don't understand this since the sess_destroy function does a DELETE FROM - seems like the whole row should be removed.

And for sess_gc, should I invoke this directly(maybe in sess_open), or does it get invoked automatically?

Is there some documentation somewhere that describes what each of these functions(sess_open, sess_read, etc.) are expecting, what each one does, what each one should return, when each one gets invoked, etc.???

TIA.
Hardy Merrill
Mission Critical Linux, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top