473,800 Members | 3,056 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

expiring sessions

I've seen a couple of questions regarding the
expiring of sessions in PHP. The way to control
how sessions expire is to set some options
in php.ini.

These options are of particular use:
session.gc_prob ability
session.gc_maxl ifetime
session.cache_e xpire

session.gc_prob ability is a percentage. 1 means 1%,
and 100 means 100%. If you want to ensure
that the gc (garbage collector) is run on every
activation of the session subsystem, set
gc_probability to 100:

session.gc_prob ability = 100

Of course, this will probably have performance
consequences. Followups to comp.lang.php.

Jul 16 '05 #1
0 1578

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

Similar topics

0
1870
by: Taz | last post by:
comp.lang.php, I have recently launched the new Planet-Tolkien.com, one would think that writing a message board from scratch and a dynamic weather system, a simple session login would be the least of my problems right? Wrong. It would appear that for Mozilla and Opera keep a $_SESSION is not an issue and the $_SESSION is continued until the member logs out. However when members are using Internet Explorer browser (most
15
1860
by: Jazzis | last post by:
I recently moved an application from W2K / IIS5 to W2K3 / IIS6. In the new environment user sessions expire after 2-3 minutes? I can't find any solution to this, although I found quite a few references to this problem on the web. Help anybody? Thanks in advance. Adam
1
1334
by: hch_nguyen | last post by:
Hi, I have an asp.net app. The session state is set to expire in 20 minutes in web.config, but my sessions seem to timeout randomly even though I interact with the application regularly, which is supposed to reset the expiration time I believe. Is there a specific way that you have to start a session or interact with it in order to keep your session current? Thanks, Christine
1
1632
by: hch_nguyen | last post by:
Hi, I have an asp.net app. The session state is set to expire in 20 minutes in web.config, but my sessions seem to timeout randomly even though I interact with the application regularly, which is supposed to reset the expiration time I believe. Is there a specific way that you have to start a session or interact with it in order to keep your session current? Thanks, Christine
3
3317
by: bennett | last post by:
In the web.config file for my application, in the <sessionState> section I have set timeout="120" (in minutes), but session state variables in my application seem to be expiring in about 5 minutes. Any idea what could cause this? I have the mode="InProc" attribute set for <sessionState>. I know that some people have solved the problem of session variables timing out too quickly by changing that attribute, but I cannot use...
6
1768
by: Adam | last post by:
On an xp machine, the caching works as expected. I have deployed to a win2k server, and an item I add to the cache expires almost immediately some times and in under a minute in other times. The aspnet_wp process is not restarting during this time, and there are no other requests, so nothing should be clearing this out. I have added a CacheItemRemovedCallback which writes debug info out to a DefaultTraceListener, but no output shows up on...
6
2122
by: Andrew Chung | last post by:
Hi all, For an application that I'm working on, upon successful authentication, Session.Timeout is set to 60 minutes. This behaviour works as expected on my own machine. If I refresh a page after 40 minutes of inactivity, it remains, but after 61 minutes, it expires and I am sent back to the login page. However, once this code is put on the Production server, the sessions time out after only 20 minutes, even though the code sets it to...
1
1308
by: csgraham74 | last post by:
Hi Guys, Im currently going round in circles with a session state issue on an asp.net vb application. Basically session state is constantly expiring after about a few clicks through my website in IE7- the funny thing is that i have just tried it in firfox and everything is working fine and session state is not expiring.
3
3537
by: rh.krish | last post by:
I have a typical ASP.NET 2.0 Forms authentication application which authenticates against Active Directory. I use non-persistent cookie so that the user is NOT remembered across browser sessions. The timeout is set to 10 minutes. Here is the important code snippets that I took from my original code: string roleToCheck = .....; FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, member.UserName, DateTime.Now,...
0
9550
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10495
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10248
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7573
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5597
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4148
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2942
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.