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 6655377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:30:45+00:00 2026-05-26T01:30:45+00:00

Using PHP, if I set a custom session folder to store session files, what

  • 0

Using PHP, if I set a custom session folder to store session files, what must I do to make sure that old session files eventually get deleted? Is there a way to have Apache or PHP handle this for me, or do I need to set something up to clean this folder out myself? Any information on this subject is greatly appreciated.

I am currently using session_save_path() to change the session folder if that makes a difference.

  • 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-26T01:30:45+00:00Added an answer on May 26, 2026 at 1:30 am

    As long as you don’t use the N; option on php’s session.save_path setting, PHP will auto-clean stale sessions according to the session.gc_probability / session.gc_divisor / session.max_lifetime settings

    If you’ve rolled your own session handlers, you’ll be responsible for the cleanup.

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

Sidebar

Related Questions

I'm working on something that was built on a PC set-up using php and
I am writing a custom session handler in PHP and trying to make the
I've set up a daemon (daemon.php) using PEAR's System_Daemon which waits for something to
I have a small ajax application built with php. Using phpMyAdmin I have set
I have a custom-built MVC PHP framework that I am in the process of
I have a set of custom PHP forms within a set of Drupal pages
I have a number of jpg files within the images folder of my custom
Is it possible using .htaccess or other apache powers to set a custom server
I am looking at using a custom template for a set of categories. Is
I am trying to make a few php scripts that will run among other

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.