On Saturday, Sep 13, 2003, at 09:22 America/Denver, Perrin Harkins wrote:
I found a pretty useful article at
http://www.linuxjournal.com/article.php?sid=4143 on how to use
Apache::Session with Mason.

I'm afraid that is not a very good article. It's out of date, and shows
poor error handling. If you want to use sessions with Mason, you should
be using the session handler that Mason provides. That is available on
CPAN and is supported on the Mason list.

Beggars can't be choosers, and all that, but would you mind telling me what handler you're talking about? I looked around for session handling and Mason, and that article was the best one I found in terms of explaining how it worked and how to use it.


Apache::Session::DBI (which is what the article refers to) is ancient and
should not be used.

How can I know this? The documentation for Apache::Session::DBIStore (which A::S::DBI refers to) doesn't say anything about being obsolete or deprecated. Is there an archive of received wisdom somewhere I should be checking to validate articles like the one I found?


You shouldn't use the IPC locking in Apache::Session. You didn't mention
which database you're using, but most of them have alternative ways of
doing locking. In my opinion, the locking approach taken in
Apache::Session is not a good one for the average web site and you should
simply turn it off by using the NullLocker.

How? I never asked for IPC locking; it somehow snuck in. It's not particularly obvious from the documentation I can find that it's going to be used, or how to select alternative methods. I installed Apache::Session from CPAN, and the docs refer to PosixFileLocker SysVSemaphoreLocker and NullLocker, but no perldocs for those modules are on my system. I'm honestly trying to figure out how I can draw those conclusions for myself, so I'm not stuck asking this list about them.


Suggestions are more than welcome; I'm not quite sure how
Session::SysVSempaphoreLocker got involved in the first place, since I
don't explicitly reference it.

Apache::Session::DBI uses it for locking.

'perldoc Apache::Session::DBI' says it uses A::S::PosixFileLocker, not A::S::SysVSemaphoreLocker. Are the docs wrong, or the code?


-=Eric



Reply via email to