473,499 Members | 1,533 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Set your default SESSION expire time

1 New Member
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. /* set the cache limiter to 'private' */
  4.  
  5. session_cache_limiter('private');
  6. $cache_limiter = session_cache_limiter();
  7.  
  8. /* set the cache expire to 30 minutes */
  9. session_cache_expire(30);
  10. $cache_expire = session_cache_expire();
  11.  
  12. /* start the session */
  13.  
  14. session_start();
  15.  
  16. echo "The cache limiter is now set to $cache_limiter<br />";
  17. echo "The cached session pages expire after $cache_expire minutes";
  18. ?>
Sep 5 '11 #1
1 1712
johny10151981
1,059 Top Contributor
First start session and then set expire time
Sep 6 '11 #2

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

Similar topics

1
2331
by: Carlos Marangon | last post by:
Hello! Can anyone please tell me how can I do to a session expire aftetr 30 seconds? And where can I find a working demo? Best regards, carlos
0
1202
by: Angelos | last post by:
Hello there... I would like to know how to set the session timeout time locally and not globally in the php.ini file. I do that as it is ine www.php.net but doesn't seem to do anything...
2
22856
by: Angelos | last post by:
Anyone knows how to expire a session after a specific time for a specific SITE and not globally ? I want if the user forgets his browser window open to automatically expire the session after 20...
2
1432
by: M P | last post by:
Does anybody know the default session expiration?
6
12859
by: David Graham | last post by:
Hi I have asked this question in alt.php as the time() function as used in setcookie belongs to php - or does it belong equally in the javascript camp - bit confused about that. Anyway, can anyone...
2
2050
by: karunakar | last post by:
Hi All I dont want to expire the applicatoion Once login the application i dont want to expire the application Presently iam doing using cookies this is not working fine Please help me out ...
1
12627
by: gvrajkumar | last post by:
Hi Popup window is opened and after some time session has expired. After session expire, if the user tries to make any actions on the popup page the user is redirected to login.jsp page. What...
2
7674
windows_mss
by: windows_mss | last post by:
hi Programmers, In course of my project now i facing an proble that i have to Redirect the page to some other Page after the Default Session Time Expire <sessionState ...
2
4535
sumittyagi
by: sumittyagi | last post by:
I am using websphere 5.1 and I want to set session timeout for my application. Now I know two ways of setting it (declaratively and programmatically). * declaratively in web.xml of the...
2
1779
by: Ben | last post by:
Hi, i use the login control with the option "remember me next time". What's the default expire time and is it possible to change it? Thanks Ben
0
7130
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
7220
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...
0
7386
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5468
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,...
0
4599
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...
0
3098
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1427
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 ...
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
295
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...

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.