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?
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:
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