RE: [PHP] Dealing with session expiry

2003-10-19 Thread Radek Zajkowski
I use it with skins on a web page, users coming in can pick a theme and for
the duration of their visit they have the theme(it's an illustrator website)

the problem that I having is that session expiry will cause that site to
fall apart after idle time.

I notice sites using login detect expiry automatically and refrest the pages
+ session, I just don't quite know how to apprach it.

R

 -Original Message-
 From: Zilvinas [mailto:[EMAIL PROTECTED]
 Sent: October 18, 2003 3:04 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Dealing with session expiry


 Hello,

 Why are you saving such information into a session? Sessions are
 for temporary information. Use cookies or database, if you are
 doing what you are saying :) There should be no harm.

 Bye.

  I have some pages that use sessions to call out certain elements in the
  layouts. It allows user to decide how should their pages look for the
  duration of their visit.
 
  Unfortunately whenever a user leaves their browser idle past
 the expity time
  of the session on their next click pages fall apart and all
 styles etc. are
  lost.
 
  I understand that I can detect or at least anticipate expiry of
 the session
  and renew it before it does. The question is how?
 
  Thanks in advance
 
  R
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Dealing with session expiry

2003-10-19 Thread Duncan Hill
Radek Zajkowski said:
 I use it with skins on a web page, users coming in can pick a theme and for
 the duration of their visit they have the theme(it's an illustrator website)

 the problem that I having is that session expiry will cause that site to
 fall apart after idle time.

 I notice sites using login detect expiry automatically and refrest the pages
 + session, I just don't quite know how to apprach it.

Then set your session timeouts to be much higher.  If, however, you want a
setting that will stay across browsers being closed, use a proper cookie, not
a session cookie.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dealing with session expiry

2003-10-19 Thread John W. Holmes
Radek Zajkowski wrote:

I notice sites using login detect expiry automatically and refrest the pages
+ session, I just don't quite know how to apprach it.
All you need to do is check that your session variables exist before you 
use them, otherwise set the values to a default. The method you're 
talking about is a simple:

if(!isset($_SESSION['logged_in']))
{ redirect_to_main_page(); }
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Dealing with session expiry

2003-10-18 Thread Zilvinas
Hello,

Why are you saving such information into a session? Sessions are for temporary 
information. Use cookies or database, if you are doing what you are saying :) There 
should be no harm.

Bye.

 I have some pages that use sessions to call out certain elements in the
 layouts. It allows user to decide how should their pages look for the
 duration of their visit.
 
 Unfortunately whenever a user leaves their browser idle past the expity time
 of the session on their next click pages fall apart and all styles etc. are
 lost.
 
 I understand that I can detect or at least anticipate expiry of the session
 and renew it before it does. The question is how?
 
 Thanks in advance
 
 R
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php