Re: Re: session timeout?

From: Date: Thu, 26 Feb 2004 05:22:02 +0000
Subject: Re: Re: session timeout?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-178905@lists.php.net to get a copy of this message
yes, please do Thanks, Jake ----- Original Message ----- From: "Phillip Jackson" <tzmguitarist@hotmail.com> To: <php-general@lists.php.net> Sent: Tuesday, February 24, 2004 2:37 PM Subject: [PHP] Re: session timeout? > i accomplish this with javascript and the current logout script that i had > written - Javascript calls a countdown and after 10 m inutes of viewing the > same page it pops a window and resets the counter; the window it pops asks > is the user would like to continue or if they would like to be logged out; > an inactive user will not make a selection so after 60 seconds, that popup > redirects the parent page to the logout page and closes itself. if the user > chose to keep working then no problem, the link to "keep me logged in" just > calls the self-close function. > > i'll post code if you're interested. > > ~phillip jackson > > > "Catalin Trifu" <catalin@isp-software.de> wrote in message > news:20040224134936.3539.qmail@pb1.pair.com... > > Hi, > > > > You have to make the code yourself, > > > > After session_start you should check the session for some > > variable you use to check if the user is logged in > > > > eg: > > <?php > > session_start(); > > if( !isset($_SESSION['logged_in']) || $_SESSION['logged_in'] > > == 0) > { > > //u'r busted go to login > > } else { > > //u'r the good guy, come in > > } > > ?> > > > > C. > > > > > > "Jake McHenry" <linux@nittanytravel.com> wrote in message > > news:005e01c3fa9b$d5f4c910$7fa1e518@JS... > > How can I make my site auto log out a user like I've seen on many sites? > > Right now, the users session never expires unless manually logging out or > > the browser is closed. Also, should I change anything to cover any > security > > issues? I havn't changed much from the default, only enough to get it > > running for my site. > > > > Here is what I have in my php.ini file: > > > > [Session] > > session.save_handler = files > > session.save_path = /var/www/sessions > > session.use_cookies = 1 > > session.name = NittanyTravelSessionCookie > > session.auto_start = 0 > > session.cookie_lifetime = 0 > > session.cookie_path = / > > session.cookie_domain = > > session.serialize_handler = php > > session.gc_probability = 1 > > session.gc_maxlifetime = 1440 > > session.referer_check = > > session.entropy_length = 0 > > session.entropy_file = > > ;session.entropy_length = 16 > > ;session.entropy_file = /dev/urandom > > session.cache_limiter = nocache > > session.cache_expire = 180 > > session.use_trans_sid = 1 > > url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" > > > > > > Thanks, > > Jake > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#178905) next »