title: Controlling PHP session timeout, reset counter on each click
body: <p>This is NOT the ordinary question of session_set_cookie_params, or session.gc_maxlifetime. I dug Google and I understood nothing.</p>
  
  <p>The scenario is rather common and usual: I want users sessions to keep working as long as the period "between clicks" is less than ten minutes, even if they stay working for hours.</p>
  
  <p>What I do in each request is the following:</p>
  
  <pre><code>session_name('session_cookie_name');
  session_set_cookie_params(600, '/'); // 600 is how much seconds in a ten minutes.
  session_cache_limiter(FALSE);
  session_start();
  </code></pre>
  
  <p>And I expect the result I mentioned above, given that session.gc_maxlifetime is set to its default value, 1440</p>
  
  <p>EDIT: </p>
  
  <blockquote>
    <p>what I got is, every 600 seconds I get a new session without data
    saved from prevous requests.</p>
  </blockquote>
  
  <p>What is the convention used to achieve that?</p>