re[PHP] moving data from old users (session_set_save_handler ??)
| From: | pere roca | Date: | Wed, 20 May 2009 08:33:28 +0000 |
| Subject: | re[PHP] moving data from old users (session_set_save_handler ??) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-292802@lists.php.net to get a copy of this message | ||
hi all,
I need to remove data when user leaves my webapplication. I fire an unload
event (that calls a php script) but sometimes fails, so I need a more secure
option.
I wonder if session_set_save_handler is what I need. I think so but not
sure.
So, EVEN if the user leaves my webapplication, will his session be
destroyed (after reaching $maxlifetime) and, as consequence, the associated
functions will be executed (functions like deleting from database, user
folders...)?
In PHP documentation, it's said:"session.gc_maxlifetime specifies the number
of seconds after which data will be seen as 'garbage' and cleaned up.
Garbage collection occurs during session start. "
And..."session.gc_probability in conjunction with session.gc_divisor is used
to manage probability that the gc (garbage collection) routine is
started.Defaults to 1" ----> does it mean that only 1% of the old sessions
(and associated actions) are deleted each time?
Some idea?
thanks alot,
Pere
--
View this message in context: http://www.nabble.com/removing-data-from-old-users-%28session_set_save_handler---%29-tp23631194p23631194.html
Sent from the PHP - General mailing list archive at Nabble.com.