Re: OT: Apache::Session::DBI vs postgresql? --help - Mailing list pgsql-general

From Alex Pilosov
Subject Re: OT: Apache::Session::DBI vs postgresql? --help
Date
Msg-id Pine.BSO.4.10.10106160038100.17529-100000@spider.pilosoft.com
Whole thread Raw
In response to Re: OT: Apache::Session::DBI vs postgresql? --help  (will trillich <will@serensoft.com>)
Responses Re: OT: Apache::Session::DBI vs postgresql? --help  (will trillich <will@serensoft.com>)
Re: OT: Apache::Session::DBI vs postgresql? --help  (will trillich <will@serensoft.com>)
List pgsql-general
Actually, I just tried your original example, and it worked for me:
        use Apache::Session::Postgres;

        #if you want Apache::Session to open new DB handles:

        tie %hash, 'Apache::Session::Postgres', $id, {
                DataSource => 'dbi:Pg:dbname=sessions',
                UserName   => $db_user,
                Password   => $db_pass,
                Commit     => 1
        };
(all works fine)

I think your problem is using wrong versions of Apache::Session. Make sure
you upgrade to latest (1.53). You should _not_ even have had
Session::DBIStore, its gone a long time ago.

And I was mistaken, its kind of a pain to use A:S:Store::Postgres, you are
supposed to use A:S:Postgres :)

-alex


On Fri, 15 Jun 2001, will trillich wrote:

> On Fri, Jun 15, 2001 at 10:59:11AM -0400, Alex Pilosov wrote:
> > Apache::Session is a generic class to store a session in some place and
> > store locking information of session in another place. You can plug in the
> > classes which detail where the session is stored/locked.
>
> sentence one, i grok. sentence two i sorta suspect, but do not
> comprehend.
>
> > Apache::Session::DBIStore is apparently broken for postgres (due to length
> > issue). I whined once to maintainer about it, but he was concerned with
> > backwards compatibility and unwilling to change it. But its outdated
> > anyway, and you are supposed to use Apache::Session::Store::* classes.
> >
> > The one you are supposed to use is Apache::Session::Store::Postgres, and
> > it should work. There's no 8k limit in postgres 7.1 on row length.
>
> <ignorance level="alarmingly embarrassing"> HOW? </ignorance>
>
> i've been studying perl modules for several months and
> it's still giving me the heebie-jeebies, nightmares, the works.
>
> from looking at the Apache::Session::Store::Postgres code, it
> sure looked like what i was after, as you suggest -- but how do i
> tell Apache::Session to use that instead of A:S:DBIStore?
>
> the manual sez--
>
>     IMPLEMENTATION
>            The way you implement Apache::Session depends on what you
>            are trying to accomplish.  Here are some hints on which
>            classes to use in what situations
>
>            Single machine *nix Apache
>                Use DBIStore and SysVSemaphoreLocker
>
> now if they'd tell me HOW (or someone shows me that they indeed
> have done so) i'd get started. :)
>
>



pgsql-general by date:

Previous
From: will trillich
Date:
Subject: Re: canned code to get db on web quickly via perl or PHP?
Next
From: "Eric Ridge"
Date:
Subject: RE: Indexing varchar[]'s