Mailing List Archive

Re: [Re: Questions about Apache::Session re DBD::Pg]
Hi

Thanks Michael for the info. Do you know how is the performance of the DBItore
vs. FileStore?

Thanks

Edgardo

Michael Kahn <michael@mkahn.dyndns.org> wrote:
> I had problems with this too. I actually had to change the code in
> Apache::Session::DBIStore to work properly with the postgres driver. For
some
> reason the driver doesn't appear to be properly escaping byte sequences, and
so
> the session data which is packed up by Storable is causing the error.
>
> As a quick fix, I added "use MIME::Base64 qw(encode_base64 decode_base64);"
to
> the top of the file, and then base64 encode and decode the session data
before
> writing to the database and reading from it. That seemed to fix the
> problem. I'll email you the updated source if you'd like.
>
> This fix is a pretty big hack, and I don't know what the performance effect
> is, but it wasn't for production code, it was for a demo.
>
> Michael Kahn
> Ottawa, Ontario, Canada
>
> On Tue, 24 Jun 2036, you wrote:
> > Hi
> >
> > I've used Embeded Perl for a while, and now I'm trying to use the session
> > funcionality. I tried to use postgresql as a database server, but I had
no
> > luck. My apache configuration file looks like:
> >
> > PerlSetEnv EMBPERL_SESSION_CLASSES "DBIStore SysVSemaphoreLocker"
> > PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:Pg:dbname=session
> > UserName=xxx"
> >
> > When I try to acces a page I get the following error:
> > The server encountered an internal error or misconfiguration and was
unable to
> > complete your request.
> >
> > Please contact the server administrator, root@morticia.pertsrl.com.ar and
> > inform them of the time the error occurred, and anything
> > you might have done that may have caused the error.
> >
> > [27900]ERR: 24: Line 15: Error in Perl code: DBD::Pg::st execute failed:
> > ERROR: parser: parse error at or near ""
> >
> > Apache/1.3.12 (Unix) mod_perl/1.22 HTML::Embperl 1.3b2 [Fri May 19
18:43:57
> > 2000]
> >
> > HTTP/1.1 500 Internal Server Error Date: Fri, 19 May 2000 21:43:57 GMT
Server:
> > Apache/1.3.12 (Unix) mod_perl/1.22
> > Connection: close Content-Type: text/html; charset=iso-8859-1
> >
> > Internal Server Error
> >
> > How could I fix it?
> >
> > Then, I tried to use FileStore, and it worked fine. However, it stores
the
> > sessions files in the /tmp directory. How could I change the location of
the
> > sessions file in the httpd.conf file?
> >
> > Any help to solve this problems will be very appreciated
> >
> > Thanks in advance
> >
> > Edgardo Szulsztein
> > edgardo@dc.uba.ar
> >
> > ____________________________________________________________________
> > Get your own FREE, personal Netscape WebMail account today at
http://webmail.netscape.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> > For additional commands, e-mail: embperl-help@perl.apache.org


____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at http://webmail.netscape.com.