HTTP Sessions

John Evans evansj at kilnar.com
Fri Dec 7 13:52:55 CST 2001


On Fri, 7 Dec 2001, Matthew J. Long wrote:

> It just seems strange to me that there is not a simpler abstraction of
> this. In PHP4, for instance, you can create a session object and store
> variables between pages without giving it much thought. This doesn't
> appear to write a cookie either, so I'm not sure how it works in PHP,
> but I figured there should be something as simple as this to use with
> perl. What I'd really like is an interface for writing my own perl
> objects that can be easily persisted. For instance, something like
> this would be nice:

PHP builds a session file and puts it in /tmp. I don't like using PHPs
built in session code because of the lack of security. If you throw it in
/tmp there's a serious chance that another user on the machine could
hijack sessions or create sessions of their own on your site. Bad, bad
stuff. Look for files that are named something like: /tmp/php.sess*


I think you're looking for something like CGI::Persistent. I've never used
it, but it appears to be what you're looking for.
http://search.cpan.org/search?module=CGI::Persistent

A little more looking and I found this module that even more closely
matches what PHP can do:
http://search.cpan.org/search?module=CGI::Session

CGI::Session claims to be a front-end to Apache::Session and that can be
found here:
http://search.cpan.org/search?module=Apache::Session


Hope these links help. Let us know how things turn out!

-- 
John Evans
http://evansj.kilnar.com/

-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s++:- a- C+++>++++ ULSB++++$ P+++$ L++++$
E--- W++ N+ o? K? w O- M V PS+ !PE Y+ PGP t(--) 5-- X++(+++)
R+++ tv+ b+++(++++) DI+++ D++>+++ G+ e h--- r+++ y+++
------END GEEK CODE BLOCK------




More information about the Pikes-peak-pm mailing list