You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Hans de Groot <ha...@interspective.nl> on 2002/02/22 13:15:46 UTC

udat and cookies and expiration

Hi,

I was wondering how udat and sessions are managed.. 
Right now it serves me right. I use udat to check logins. and as long as I keep my all my iexplore windows open I stay logged in.
When I close all windows and go back to the site I have to login again. It seems a new session ist started.
In this case it works perfect. 
But I would like to use $udat to store things like the last page visited and maybe the search words they used. (or frameset/frameless mode)
and this does not work coz it apaears the session is reset after a close (or restart) of the browser.

Any suggestions how to do this? is it possible at all? or do I really need to use normal cookies (set the manually), I prefer to use $udat if possible. 

Thanks

Hans de Groot
 

------
Hans de Groot
Interspective Internet Services B.V.
Tel: +31 (0) 30 6001180
Fax +31 (0) 30 6044204
www:   http://www.interspective.nl
email:   hansg@interspective.nl




---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: udat and cookies and expiration

Posted by Gerald Richter <ri...@ecos.de>.
>
> It sounds like you've got a very short expiry time on your cookie from
> within Embperl. The three variables that govern the cookie settings
> are:
>
> EMBPERL_COOKIE_DOMAIN
> EMBPERL_COOKIE_PATH
> EMBPERL_COOKIE_EXPIRES
>

Additional note: When EMBPERL_COOKIE_EXPIRES is not set (which is the
default) the cookie only exists until the user closes his browser i.e. it
will never be saved to disk.

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: udat and cookies and expiration

Posted by Andrew O'Brien <an...@switchonline.com.au>.
On Fri, Feb 22, 2002 at 01:15:46PM +0100, Hans de Groot wrote:
> Hi,
> 
> I was wondering how udat and sessions are managed..  Right now it
> serves me right. I use udat to check logins. and as long as I keep
> my all my iexplore windows open I stay logged in.  When I close all
> windows and go back to the site I have to login again. It seems a
> new session ist started.  In this case it works perfect.  But I
> would like to use $udat to store things like the last page visited
> and maybe the search words they used. (or frameset/frameless mode)
> and this does not work coz it apaears the session is reset after a
> close (or restart) of the browser.
> 
> Any suggestions how to do this? is it possible at all? or do I
> really need to use normal cookies (set the manually), I prefer to
> use $udat if possible.

It sounds like you've got a very short expiry time on your cookie from
within Embperl. The three variables that govern the cookie settings
are:

EMBPERL_COOKIE_DOMAIN
EMBPERL_COOKIE_PATH
EMBPERL_COOKIE_EXPIRES

Try setting these to something like:

EMBPERL_COOKIE_DOMAIN  .mydomain.blah
EMBPERL_COOKIE_PATH    / 
EMBPERL_COOKIE_EXPIRES +7d
(for a 7 day expiry)

Make sure that the cookies aren't being deleted and are definitely
being saved to disk on browser shutdown.

If you can be sure that both the cookie exists in your browser when
you return to the site and that same cookie value exists in your
sessions database at the same time then data in %udat should be
persistent. That's what sessions are for, after all :)

-- 
 Andrew O'Brien                                                               
 Senior Engineer                         email: andrewo@switchonline.com.au.
 Switch Online Group Pty Limited         phone: +61 2 9299 1133             
 ABN 89 092 286 327                      fax:   +61 2 9299 1134             

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org