Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 422939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:07:51+00:00 2026-05-12T19:07:51+00:00

Is it possible to configure PHP sessions to never expire? I currently have the

  • 0

Is it possible to configure PHP sessions to never expire? I currently have the default 24 minutes set in php.ini – I could whack this up to a couple of weeks or something like that but I was wondering if I can set them to infinite lifetime?

I want to achieve a similar effect to Stackoverflow’s: I never have to log in here. Is this achieved on SO with a never-expiring session or some other means?

Also, as a secondary question: How do the expired session files get cleaned up? If someone creates a session and never returns, which process is cleaning up their expired file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T19:07:51+00:00Added an answer on May 12, 2026 at 7:07 pm

    Normally, what appears to be an everlasting session is two things: a session, which expires pretty soon, and a very long-life cookie containing an auto-login token.

    There’s a great series of responses on sessions and logging-in contained in this StackOverflow question: The Definitive Guide To Website Authentication

    Regarding your question about when sessions are cleaned up, there are several php.ini settings for controlling when the garbage collection for sessions is triggered.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How do I configure PHP to have permission to create directories and
Possible Duplicate: What’s the difference of `./configure` option `--build`, `--host` and `--target`? This is
Is it possible to configure my local setup (running Wampserver) so that my PHP
Is this possible to configure IIS7 to achieve the same functionality like Apache has
Possible Duplicate: using seo user friendly in php I have 3 PHP files: index1.php,
Possible Duplicate: How to make PHP set HTTP status code to 500 automatically in
Is it possible to configure an endpoint to act as a worker retrieving jobs
Is it possible to configure svn such that it automatically sets the svn:keywords property
Is it possible to configure or modify the NoseGAE plugin to automatically update index.yaml
In views, is it possible to configure a cck taxonomy field so that a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.