title: How to make SESSION cookies last for a year?
body: <p>How do you make a SESSION cookie last for longer?</p>
  
  <p>I'm using this code in the file that logs in my users:</p>
  
  <pre><code>&lt;?
  session_regenerate_id();
  session_set_cookie_params(3600*24*365);
  session_start();
  $_SESSION['u']['id'] = xxxx;
  ?&gt;
  </code></pre>
  
  <p>And on the rest of the site I use only <code>session_start();</code> to start the session.</p>
  
  <p>The cookie PHPSESSID on the client is set to expire in 365 days but if I don't use the site for a day and come back I'm logged off. Do I have to do something else to make the cookie last longer?</p>