title: PHP - ini_set('session.gc_maxlifetime', 5) - Why it doesn't end the session?
body: <p>The PHP script is as follows:</p>
  
  <pre><code>&lt;?php // continue.php
  ini_set('session.gc_maxlifetime', 5);
  session_start();
  echo ini_get('session.gc_maxlifetime');
  // wait for 7 seconds
  usleep(7000000);
  if (isset($_SESSION['username']))
  {
      $username = $_SESSION['username'];
      $password = $_SESSION['password'];
      $forename = $_SESSION['forename'];
      $surname  = $_SESSION['surname'];
  
      echo "Welcome back $forename.&lt;br /&gt;
            Your full name is $forename $surname.&lt;br /&gt;
            Your username is '$username'
            and your password is '$password'.";
  }
  else echo "Please &lt;a href=authenticate2.php&gt;click here&lt;/a&gt; to log in.";
  
  ?&gt;
  </code></pre>
  
  <p>Based on the timeout (i.e. 5 seconds), the script should not print out anything.
  However, I still receive the following message</p>
  
  <pre><code>5Welcome back Bill. Your full name is Bill Smith. Your username is 'bsmith' and your password is 'mysecret'.
  </code></pre>
  
  <p>It seems that the line ini_set('session.gc_maxlifetime', 5) doesn't work as it should be.
  I am using windowsXP + XAMMP.</p>
  
  <p>May you tell me how to make it work?</p>
  
  <p>Thank you</p>