title: safari/opera session cookie deleted prematurely
body: <p>I've set a PHP session cookie with lifetime 0 (to expire on browser close) but I've been getting logged out of the session after only a few seconds.</p>
  
  <p>I am observing the safari cookies popup window (in safari preferences) and while reloading the page I see the cookie vanish from the list only to be replaced by a new session id when being redirected to the login page (where a new session is started and thus cookie set).  </p>
  
  <p>This behaves the same way with opera.<br>
  Firefox is fine however.  In fact I've been using the site for a while without any trouble in firefox so if it were to affect it too I would have seen it by now.  </p>
  
  <p>I have tried tooling with numerous HTTP headers like Cache-control, checked that <code>session_write_close()</code> is in the right spots (but really this shouldn't matter because I'm just refreshing the page), also I checked the session garbage clean up settings, but when I saw these cookies vanish on their own I almost jumped out of my socks!    </p>
  
  <p>mac 10.6.4
  opera 10.10
  safari 5.0.2</p>
  
  <p>I should also mention this site has ajax requests going on, though none of them attempt to destroy the session or remove the cookie in any way (directly).  </p>
  
  <p>EDIT: Just tested on win XP: FF okay, Safari same phenonmenon as on Mac.</p>
  
  <p>EDIT: <a href="http://dailyraisin.com/safari-cookie-bug.html" rel="nofollow">This short video</a> illustrates this issue on Windows. </p>