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

  • Home
  • SEARCH
  • 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 6071393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:02:31+00:00 2026-05-23T10:02:31+00:00

My php.ini file is set to expire sessions within 24 hours. But my users

  • 0

My php.ini file is set to expire sessions within 24 hours. But my users complain after being logged out after just 20 minutes or so.

I use session_start at the beginning of every page. Could that be messing things up for me?
Or could there be anything else causing this?

Just realized I might be on a shared hosting. And it might have some group settings for garbage collection with sessions. Anyone know how to look into this or set mine to be more specific?

Thanks!

  • 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-23T10:02:32+00:00Added an answer on May 23, 2026 at 10:02 am
    ini_set('session.gc_maxlifetime',28800);  #28800 - just an example time - set your own
    ini_set('session.gc_probability',1);
    ini_set('session.gc_divisor',1);
    session_save_path('/path to your sessions folder');
    ob_start();
    session_start();
    

    You do need to create a session folder first.
    This works for sure on GoDaddy shared hosting.
    On VPS you can use this or just update your php.ini file.

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

Sidebar

Related Questions

I set the session file in php.ini to expire in one month (in fact
I had this setting in my php.ini file: error_reporting = E_ERROR|E_PARSE|E_CORE_ERROR|E_COMPILE_ERROR But I was
Possible Duplicate: PHP sessions timing out to quickly In my .htaccess file I have
I have set all of my PHP settings in the php.ini file to allow
I'm trying to use the phpunit configuration file to set a specific php-ini setting.
using Fast CGI I can't get it to read the php.ini file. See my
i am trying to change user agent in php.ini file as follows. user_agent=Mozilla/5.0 (iPhone
Configuration File Path : /etc/php.ini Additional .ini files under /etc/php.d : curl.ini, fileinfo.ini,gd.ini,json.ini, mysql.ini,
Is it possible to make changes in mysql's my.ini file using PHP script?
've registered xdebug in php.ini (as per http://xdebug.org/docs/install ) but it's not showing up

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.