Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h3>To ensure it'll not expire before its time</h3> <p>If you're using cookies for sessions, you use <a href="http://pt2.php.net/manual/en/function.session-set-cookie-params.php" rel="nofollow noreferrer"><code>session_set_cookie_params</code></a> to set the expiration time of the corresponding cookie.</p> <p>You'll also need to change <a href="http://pt2.php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime" rel="nofollow noreferrer"><code>session.gc-maxlifetime</code></a> and quite possibly <a href="http://pt2.php.net/manual/en/session.configuration.php#ini.session.save-path" rel="nofollow noreferrer"><code>session.save_path</code></a>, though it may vary if you're not using the file sessions save handler.</p> <h3>To ensure it'll not expire after its time</h3> <p>This will guarentee a minimum duration for the session, but you must also save in the session itself when it will expire and check against that to make sure the session doesn't last more than it's supposed to.</p> <p>This is because:</p> <ul> <li>The expiration date of the cookie may have been tempered with (extended by the user). </li> <li><code>session.gc-maxlifetime</code> doesn't guarentee the expired session will be garbaged collected after that period and it refers to a maximum lifetime of inactivity, not total duration.</li> </ul> <p>So you have to also check server-side whether the session is valid – see <a href="https://stackoverflow.com/questions/520237/how-do-i-expire-a-php-session-after-30-minutes/1270960#1270960">this answer</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload