title: Codeigniter session destroy on browser close doesn't work
body: <p>I'm using Codeigniter 2.2.0, trying to set my session in order to destroy session when a browser is closed. In my <code>application/config/config.php</code>, I have set </p>
  
  <pre><code> $config['sess_use_database']   = TRUE;
   $config['sess_expire_on_close']    = TRUE;
  </code></pre>
  
  <p>but it doesn't work. The session that stored in database is not destroy. I try to do this:</p>
  
  <pre><code>$this-&gt;session-&gt;set_userdata(array('user'=&gt;'user1','login'=&gt;TRUE));
  </code></pre>
  
  <p>and the session is stored in database with serialize user_data. And then I close the browser, and open the browser again, and run the same code above. Because the first session is not deleted from table, now I got 2 record in the session table with the same value in user_data column, but different session_id value. All I want is the first session must be destroyed and also deleted from database.</p>
  
  <p>How can I fix this problem? Any suggestion? </p>