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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:29:05+00:00 2026-06-08T20:29:05+00:00

I am running Apache 2.2 with the latest build of PHP and mysql. In

  • 0

I am running Apache 2.2 with the latest build of PHP and mysql.

In my PHP.ini file, I can see the session timeout is set to 0, meaning the session stays live until the browser closes.

I have noticed however, that sometimes when coming in in the morning, and leaving the browser open and logged in overnight, the session seems to have expired.

Are there any other configuration settings that would be causing the session to expire? I just want to play around with the values and see what kind of time works best for my site.

Many thanks

Eds

  • 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-06-08T20:29:07+00:00Added an answer on June 8, 2026 at 8:29 pm

    You can try:

    https://www.php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime

    you can put this in your PHP file, second parameter is number of seconds after which data will be seen as ‘garbage’ and potentially cleaned up. :

    ini_set('session.gc_maxlifetime', 30*60);
    

    Hope this help!

    Edit:

    yes, i should mention that, thanks for pointing out.

    As suggested by Willem

    "call to that function has to be made before the session_start(); – Willem "

    Example:

    <?php
    
     ini_set('session.gc_maxlifetime', 30*60);
     session_start();
    
     ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are running Apache 2.2.16 and PHP 5.3.3 with DomPDF to generate PDFs. After
i use Mono 2.11.1 build running Apache on Centos 6.0 64bits, to run a
I am running Apache 2.3.16 with PHP 5.3.9. I also have a third party
I am building web application in Windows 7 OS running Apache Server, PHP 5.3
I have php 5.1.6 running on my CentOS 5 server running Apache 2.2.3 I
I'm running Rails 3.1.2 on Apache with the latest Passenger, 3.0.11. I'm using force_ssl
When running latest (05/2012) Solr based n Nutch, folowing the official tutorial by Apache,
I'm running Apache 2.2.17 and PHP 5.3.5 on a Windows 7 64-bit machine. I
I have a Mac running Lion and I just downloaded latest version of apache.
Our current Apache installations are running Apache 2.0. Now we'd like to add some

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.