General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old February 20th, 2003, 09:12 AM
wareseeker wareseeker is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 71 wareseeker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 7 sec
Reputation Power: 6
Question how to set session_timeout()?

I currently develope a Members Area using Session. It is going quite well since I got into this matter I just don't know how to set it up. Could anyone give me some of your times to solve this problem? I would appreciate very much. The question is:

I have created a Members Area using Session Array Vars they are not saved into database. Everytime users logg in and they forget to LOG OUT and leave their Session Array Vars valid wandering around. It could be an insecurity hole on their browsers. I just wanna to create a session time out or any thing that will automately destroy the Session Array Vars in a certaint amount of time from the time they log out.

Thanks,

Reply With Quote
  #2  
Old February 20th, 2003, 10:42 AM
Taelo Taelo is offline
5B's
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: PC, FL
Posts: 364 Taelo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 26 sec
Reputation Power: 6
if you are not saving the session vars,...then when the user closes the browser, the session should end.
__________________
-- Jason

Reply With Quote
  #3  
Old February 20th, 2003, 01:02 PM
wareseeker wareseeker is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 71 wareseeker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 7 sec
Reputation Power: 6
I don't think it will be ended. If I know session id I still be able to log in the members area. Correct me if I am wrong. Thanks.

Reply With Quote
  #4  
Old February 20th, 2003, 03:58 PM
Taelo Taelo is offline
5B's
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: PC, FL
Posts: 364 Taelo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 48 m 26 sec
Reputation Power: 6
I dunno,...but how would get that anyway if you are an end user?

if you have session_start(); on every page,....do a check to see if some session_var is set,..if not,..kick them out to the login page

Reply With Quote
  #5  
Old February 20th, 2003, 06:11 PM
laidbak laidbak is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Location: In Tha IE -- San Bernardino COUNTY
Posts: 788 laidbak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 4 m 2 sec
Reputation Power: 7
Send a message via ICQ to laidbak Send a message via AIM to laidbak Send a message via MSN to laidbak Send a message via Yahoo to laidbak
By default, session variables are stored as text files in a temporary directory.

If you are testing this on a windows machine, go look in c:\temp after creating a session in the browser.

Now, what happens when a user closes the browser?
The session is dumped. It is no longer valid. Don't worry about the temporary files hanging around... they don't get deleted for a while.

The deletion of your temporary session files are due to a setting in the php.ini. you can also set this at run-time.


It is called session.gc_probability.
It is set to "1" by default.

If I am correct, this setting means that you have a 1% chance on each hit of that page that the contents of the temporary directory will be checked for deletable files.

So basically, the rule I use is:

On low traffic sites, if you want this deleted a lot, set it high.
On high traffic sites, it will get deleted quickly because there is lots of traffic, so set it low as to keep from having your hard disk spinning too much.
__________________
__________________________________________________ _
Wil Moore III, MCP | Integrations Specialist | Senior Consultant
Are You Listed...? | DigitallySmooth Inc.

Reply With Quote
  #6  
Old February 20th, 2003, 09:17 PM
wareseeker wareseeker is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 71 wareseeker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 7 sec
Reputation Power: 6
Thank you very much for all your helps. They mean so much to me. I have learned a lot from you guys. But all of your messages have not helped my problem solved. Allow me to make this clear.

All of my codes have been testing from a remote server.

I do have a checklogin() function on every members area page.
If I had my SessionId; I still be able to login, I think the session will not be destroy. Because I have tested several times.
Quote:
if you have session_start(); on every page,....do a check to see if some session_var is set,..if not,..kick them out to the login page

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > how to set session_timeout()?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway