Ignore:
Timestamp:
Jun 2, 2010 5:25:56 AM (14 years ago)
Author:
quinn
Message:

Updated dbsessionhandler.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/DBSessionHandler.inc.php

    r362 r373  
    7373                $this->initDB();
    7474
    75                 ini_set('session.save_handler', 'user');
    7675                session_set_save_handler(
    7776                    array(&$this, 'dbSessionOpen'),
     
    8281                    array(&$this, 'dbSessionGarbage')
    8382                );
     83                register_shutdown_function('session_write_close');
    8484            }
    8585        }
     
    126126
    127127    function dbSessionClose()
    128     {
     128    {       
    129129        return true;
    130130    }
     
    161161    }
    162162
    163     function dbSessionGarbage($max_lifetime=4000)
     163    function dbSessionGarbage($max_lifetime=72000)
    164164    {
    165         // Delete old values from the session table
     165        // Delete old values from the session table.
    166166        $qid = $this->db->query("DELETE FROM " . $this->db->escapeString($this->_params['db_table']) . " WHERE UNIX_TIMESTAMP(last_access) < " . (time() - $max_lifetime));
    167167
Note: See TracChangeset for help on using the changeset viewer.