Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I've recently decided to see what was available for handling sessions in Perl. I've done sessions in Java, which is rather simple (being built into Servlets and all), and I've done my own in Perl with CGI apps before.
So, using mod_perl, what are people's opinions about the best method for handling sessions? Apache::Session seems to be what all the books and websites talk about, but I had many problems that others seem to have (but found no final answer). I find that data I put into my tied hash don't seem to stick. But on occasion it does.
I thought this might be due to my using PostgreSQL for the Store. So I tried the File store. I had similar behavior. My only thought is that it's something related to MacOS X's perl implementation (5.6.0). Hopefully that will be updated soon. I found people with the same questions over the years in archived discussion forums. But few answers.
So, I tried CGI::Session. Although not accurately documented, it does work with PostgreSQL and other stuff. I don't know how "safe" it is for mod_perl though. Also, CGI::Session seems more recently maintained, as opposed to the 2001 last update for Apache::Session. Also, CGI::Session seems to have nice support for automatic expiration, etc.
What are your experiences with Sessions and mod_perl? Anyone know what some of the best options are for this?
Looking forward to yer thoughts...
-Alex
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Apache::Session vs. CGI::Session
by PodMaster (Abbot) on Apr 12, 2003 at 02:19 UTC | |
by perrin (Chancellor) on Apr 12, 2003 at 16:43 UTC | |
|
Re: Apache::Session vs. CGI::Session
by adrianh (Chancellor) on Apr 12, 2003 at 23:11 UTC |