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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:57:29+00:00 2026-06-03T04:57:29+00:00

So I have looked about on here and web in general and cant find

  • 0

So I have looked about on here and web in general and cant find anything for exactly what I need. I have seen a bunch of posts about forcing it to expire after an exact amount of time, but I just want to extend my session lifetime.

I am not sure if it is based on inactivity, or just a set length of time, but it seems that it will lose any session data stored. For example cart data on a shopping basket.

I just want to be able to keep the product data in there for more than what seems like 30 mins, so I have the below included at the top of every script, but it definitely does not last 10 hours.

ini_set("session.cookie_lifetime","36000");
ini_set("session.gc_maxlifetime","36000");

session_start();

I was under the impression that sessions expired when the browser closes, and cookies expire based on time, I dont use cookies, just sessions.

So my question, how do I extend the life of my session?

  • 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-03T04:57:31+00:00Added an answer on June 3, 2026 at 4:57 am

    If you want a longer session, you may want to consider using cookies (for safe variables only! Never store unencrypted private information in a cookie!).

    Assuming the user will want to view his shopping cart at a later time, your best options are:

    1. Enforce account registeration, and save the shopping cart in a database for each user.
    2. Use a cookie to store the shopping cart locally on the user’s machine.

    Do note that some users may disable cookies, so display a big fat warning that your site will fail if cookies are not enabled.

    See Teh Manual

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

Sidebar

Related Questions

I have looked on the web to find a list of all Python keywords
I have looked at most threads here about Doubly linked lists but still unclear
I have looked at the other questions on here about this. It isn't working.
I have looked at the documentation on MSDN about these 2 functions. However, I
I have looked here and from what I understand the following regex simply means
I have looked and I could not find this question before, and it surprises
Alright...I've given the site a fair search and have read over many posts about
I have asked this question here about a Python command that fetches a URL
I've looked all over the web for about a week now and not found
So ok before you start talking about that I should have looked it 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.