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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:32:22+00:00 2026-05-16T11:32:22+00:00

This is really bugging me. Has been for years. No matter what I do

  • 0

This is really bugging me. Has been for years. No matter what I do with core.php or php.ini, my logins timeout after about an hour – usually. Some deployments of identical code and configuration timeout after a respectable amount of time.

This is what I have at the moment on one site – timed out after about an hour:

session.gc_divisor  1000
session.gc_maxlifetime  86400
session.gc_probability  1

Configure::write('Session.timeout', '28800');
Configure::write('Session.checkAgent', false);
Configure::write('Security.level', 'medium');

And another – lasted all night:

session.gc_divisor  100
session.gc_maxlifetime  14400
session.gc_probability  0

Configure::write('Session.timeout', '315360000');
Configure::write('Session.checkAgent', false);
Configure::write('Security.level', 'medium');

Now, before you get excited and say, “Well, the answer is there in the Session.timeout value”, let me tell you that this site usually times out after about twenty minutes!

  • 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-16T11:32:22+00:00Added an answer on May 16, 2026 at 11:32 am

    Somewhere I read that on shared hosting, other applications can reset the session by clearing the php-defined session directory. This was alluded to by Rowlf in his answer.

    CakePHP offers the option to configure the way sessions are handled. In core.php I changed this to 'cake' (by default it is 'php'):

    /**
     * The preferred session handling method. Valid values:
     *
     * 'php'            Uses settings defined in your php.ini.
     * 'cake'       Saves session files in CakePHP's /tmp directory.
     * 'database'   Uses CakePHP's database sessions.
     */
    Configure::write('Session.save', 'cake');
    

    I also ensured that the session timeout and the corresponding php.ini values are the same:

    /**
     * Session time out time (in seconds).
     * Actual value depends on 'Security.level' setting.
     */
    Configure::write('Session.timeout', '86400');
    

    So far, the system hasn’t logged out.

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

Sidebar

Related Questions

This has been bugging me for years, but I've just been ignoring it, like
This has been bugging me for awhile now. In a deployed PHP web application
As a C++ stickler, this has really been bugging me. I've always liked the
This is one thing that has been bugging me for a while about DDD.
This has been bugging me for about 4 hours, so I thought it's time
I've been having this really annoying thing happen the past few days, that has
This has been bugging me for a while, so I asked a coworker if
This issue has been bugging me for the past several days. I've been working
This question has been bugging me for a while now. When writing a CSS
This has been bugging me for days; I'm trying to send a SOAP post

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.