Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: the best way to implement persistent data across CGI scripts

by ncw (Friar)
on Sep 20, 2000 at 10:17 UTC ( #33253=note: print w/replies, xml ) Need Help??


in reply to the best way to implement persistent data across CGI scripts

There is no need to re-invent the wheel here - there is a module called Apache::Session which implements most of the above methods.

It is an OO module with pluggable backends, and it can store things in files Apache::Session::File databases Apache::Session::MySQL and many more!

A very good reference on this is the mod_perl book Writing Apache Modules with Perl and C. This goes on in depth about all the above methods you suggest. It also talks about how to make sure the user keeps giving you back the session number - in a cookie, in a form or as part of the URL eg http://z.com/87665456789/page.cgi(easy to do with mod_perl hard otherwise)

merlyn implemented a novel approach to session storage by spawning a new webserver for each session on a new port. This has the advantage that you can store lots of data in variable form in memory. It needs careful management though. Look for it in his web column here.

  • Comment on Re: the best way to implement persistent data across CGI scripts

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://33253]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2022-01-24 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (64 votes). Check out past polls.

    Notices?