473,387 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Does setting session.gc_maxlifetime affect all sessions on server?

Before I extend the users session timeout, with
ini_set("session.gc_maxlifetime",86400*2); // buy the user 48 hours to
make a decision, I wanted to know if this idea is going to affect all
users/session on the server or just the "current user session?" There
isn't a user/pass combo to get in my site. Once the cart is started,
this script is invoked. When this site is released to the client, I
don't want him coming back to me one day to say his site is down
because of an indefinite memory full thing.

Thanks!

Jan 17 '07 #1
1 2675
On 17 Jan 2007 08:24:01 -0800, ro***********@gmail.com wrote:
>Before I extend the users session timeout, with
ini_set("session.gc_maxlifetime",86400*2); // buy the user 48 hours to
make a decision, I wanted to know if this idea is going to affect all
users/session on the server or just the "current user session?"
That will affect the session garbage collection run at the end of the current
request. However, it won't affect other session garbage collection runs done on
the back of requests for pages that don't have that ini_set call - this isn't
something stored within the session files.

So, if there are other sites on the same server, you'd have to also modify the
session.save_path for your sessions where you want a longer gc_maxlifetime,
else they'll just be purged by the settings that apply to the other sites and
you just end up (on average) the shortest value set. If you put the sessions
files elsewhere then they'll be isolated from this.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jan 17 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: jarret.austin | last post by:
Hi all I'm trying to set my sessions to be deleted after 60 seconds of inactivity (for testing), however they seem to be deleted after 60 seconds regardless of activity. I have the following...
1
by: mudge | last post by:
I'm running PHP Version 4.3.10. I'm trying to make it so that when a person logs in using a user name and password that their session is valid and continues for a few months so they don't have to...
8
by: ndsoumah | last post by:
hello guys I'm trying to get access to variables I put in a session variable from another page and it fails... here's the exact situation main file page1.php
3
by: Craig Storey | last post by:
I have a form where users logged in using sessions can edit articles in a WYSIWYG editor. Some of them take their time and don't like to save their work very often and occassionally the sessions...
6
by: somaboy mx | last post by:
Hello I need people to be able to complete long text blocks in my cms before their session times out. From the php documentation I gather that ini directive session.gc_maxlifetime would be the...
2
by: Mickey | last post by:
Hi, I just have a couple of questions regarding sessions. I read the php manual but I just wasn't clear on a couple of things. I am using the following to control my sessions: ......
1
by: Rogier | last post by:
Hello, I made a simple script with some session variables. When I work in the application, and when I don't use the application for some time, the session vars are erased... even when I set the...
6
by: laredotornado | last post by:
Hi, When a user logs into our site, we create a session variable to denote the session is active and another to denote who is logged in. Once the user closes the browser and re-opens it, the...
3
by: jodleren | last post by:
Hi I am wondering what goes wrong... I have session_cache_expire(30); session_start(); How can I check whether the _last_ session (from e.g. yesterday) has ended?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.