473,811 Members | 4,047 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

session expire help

5 New Member
i want my script to automatically expire session in a given period of time e.g 5mins (as a test). my problem is when ive set session_cache_e xpire(5); in my script, run it and wait for about 6-10mins then click a link that has the particular session it still dont expire. i have also tried ini_set(session .cache_expire, '5'); but still got no expired session. in php.ini session.cache_e xpire is set to 30. i have no access to php.ini. any idea guys on how to do this?
Mar 2 '07 #1
1 3613
vssp
268 Contributor
session_cache_l imiter('private ');
$cache_limiter = session_cache_l imiter();

/* set the cache expire to 30 minutes */
session_cache_e xpire (30);
$cache_expire = session_cache_e xpire();

/* start the session */

session_start() ;
// Unset all of the session variables.
session_unset() ;
// Finally, destroy the session.
session_destroy ();
Mar 2 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
39509
by: Ryan Hubbard | last post by:
I would like to limit multiple logins for a user. How and when does the session id expire? Can I set it so after x minutes of inactivity it would expire. How do I check if session id exists? If I can do these two things then I can store the session id for a user in a database and everytime he requests an action I can just check if the session id is active or expired. If active let him continue if expired request to relogin. If the...
3
2811
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 expire and their work goes poof. (I've suggested editing off-line and simply copy+paste but they prefer the editor.) After a lot of searching I've found the main culprit is session.gc_maxlifetime and I can set it longet like... ...
5
3711
by: tshad | last post by:
If I am using FormsAuthentication, is there a way to check who is logged in? I want to be able to check at any particular time, not just how many people are logged in, but who they are. One thing I want to do is not allow someone to log on from one browser and then log on again at the same time time from another browser. Or to prevent someone from using the same login at the same time. Thanks,
17
5221
by: jensen bredal | last post by:
Hello, i'm struggling with a somehow badly understood session scenario. I provide acces to my pages based on form authentication using Session cookies. Som of my pages are supposed to be running continuously and refreshing once an hour. I there set timeout= 61 in <sessionState section and on my page it says <meta http-equiv="refresh" content="3600">. I also set timeout=120 in the <forms section of web.config to make sure
0
1158
by: T Ralya | last post by:
My Session restarts on each postback of my ASP.NET page. I'm trying to figure out why. I set up a test application and have verified that the Request Object has one cookie on each entry. This Session ID cookie has a new session ID value and an expire attribute of zero on each post back. I verified that when the page exits, the Response object has one cookie with the same session ID as the Request object. The Session Object has 2...
2
2679
by: satisharas | last post by:
Hello, I am trying to write a custom session manager in ASP.NET 2.0 using oracle as the backend. I want to know how the session expires in web garden and we are using NLB (a session can be served by the multiple web servers) Following are few points: 1. How to cleanup session data on Oracle table (on which event need to
0
4240
by: dadasurf80 | last post by:
Hello, I've a problem with Axis which gives me a "Session alreday invalidated" message after a time of inactivity. I use: - Tomcat : 4.1.29 - Axis : 1.3 - JVM : 1.4.2-b28 The complete message I recieved:
1
1554
by: seigan | last post by:
Hi all, I'm kind of new here and I realy need your help guys. I have done an basic php login script with sesions that will expire after default time. The thing is that it dosen't work at all. If you login the session nevere expire. If I check the time with print ini_get("session.gc_maxlifetime"); it says 1440 and if I change it to 1 with ini_set("session.gc_maxlifetime", "1"); the chenge is noticed but the session still exists!!! What have I...
4
3175
by: Bishop | last post by:
ASP.NET 2.0/IIS 6/Windows 2003 I have all my session settings set to the standard 20 min. but many times the session will time out prior to 20 min. of inactivity. My questions are: 1. Is there any way to find out why a session was reset? 2. Is there anything other than a session ID I can use to record data throughout a "session" (From the time someone starts visiting until they finish) I can't use client IP address because we get to...
0
9724
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10644
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...
0
10379
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10394
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,...
0
9201
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4336
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
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
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.