Mailing List Archive

Apache::Session::DBIStore and pgsql
Hello all,

I am experiencing a problem on several different machines machine with
Apache::Session::DBI (however other methods work fine, ie ::FILE)

Searching back through the archives I have seen other issues with postgres
but not of this type or of this vintage.

When trying to create a new session using the postgres dbd driver I get the
following error:

DBD::Pg::st execute failed: ERROR: parser: parse error at or near ""

If i try to run the perl debugger on it I find that the error occurs in the
insert method in DBIStore.pm

Attempting to print the query string works fine and I can do a manual insert
of the same data.

However if I enable DBI logging i get a query string similar to the following:

-> execute for DBD::Pg::st (DBI::st=HASH(0x81f5298)~0x81f51d8)
dbd_st_execute
dbd_st_execute: statement = >
INSERT INTO sessions (id, length, a_session) VALUES ('d729949384de79cf',41,'^C^C<
ERROR EVENT 7 'ERROR: parser: parse error at or near ""
' on DBI::st=HASH(0x81f51d8)
ERROR: parser: parse error at or near ""
error 7 recorded: ERROR: parser: parse error at or near ""
!! ERROR: 7 'ERROR: parser: parse error at or near ""
'
<- execute= undef at DBIStore.pm line 143.

Is Postgres getting confused by the session information in the last field?

I have no problems with DBI connections using perl and postgres

Perl Info Follows

version of Apache::Session: 1.03
version of DBI: 1.13
database Postgres 6.5.3, dbd driver version 0.93
mod_perl: 1.21
apache: 1.3.9

perl -v: 5.005_03

perl -V:

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
Platform:
osname=linux, osvers=2.3.39, archname=i386-linux
uname='linux samwise.tausq.org 2.3.39 #1 smp wed jan 12 05:59:50 mst 2000 i686 unknown '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-O2 ', gccversion=2.95.2 19991109 (Debian GNU/Linux)
cppflags='-Dbool=char -DHAS_BOOL -D_REENTRANT -DDEBIAN -I/usr/local/include'
ccflags ='-Dbool=char -DHAS_BOOL -D_REENTRANT -DDEBIAN -I/usr/local/include'
stdchar='char', d_stdstdio=undef, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lc -lposix -lcrypt
libc=, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
Built under linux
Compiled at Jan 22 2000 10:24:15
@INC:
/usr/lib/perl5/5.005/i386-linux
/usr/lib/perl5/5.005
/usr/local/lib/site_perl/i386-linux
/usr/local/lib/site_perl
/usr/lib/perl5
.


--

Adam Cassar
Senior Web Developer
___________________________________________
NetRegistry http://www.netregistry.com.au
Tel: +61 2 9699 6099 | Fax: +61 2 9699 6088
PO Box 270 Broadway NSW 2007 Australia

--

Adam Cassar
Senior Web Developer
___________________________________________
NetRegistry http://www.netregistry.com.au
Tel: +61 2 9699 6099 | Fax: +61 2 9699 6088
PO Box 270 Broadway NSW 2007 Australia
Re: Apache::Session::DBIStore and pgsql [ In reply to ]
On Fri, Feb 18, 2000 at 09:48:00AM +1100, Adam Cassar wrote:
> Hello all,
>
> I am experiencing a problem on several different machines machine with
> Apache::Session::DBI (however other methods work fine, ie ::FILE)
>
> Searching back through the archives I have seen other issues with postgres
> but not of this type or of this vintage.
>
> When trying to create a new session using the postgres dbd driver I get the
> following error:
>
> DBD::Pg::st execute failed: ERROR: parser: parse error at or near ""
>
> If i try to run the perl debugger on it I find that the error occurs in the
> insert method in DBIStore.pm
>
> Attempting to print the query string works fine and I can do a manual insert
> of the same data.
>
> However if I enable DBI logging i get a query string similar to the following:
>
> -> execute for DBD::Pg::st (DBI::st=HASH(0x81f5298)~0x81f51d8)
> dbd_st_execute
> dbd_st_execute: statement = >
> INSERT INTO sessions (id, length, a_session) VALUES ('d729949384de79cf',41,'^C^C<
> ERROR EVENT 7 'ERROR: parser: parse error at or near ""
> ' on DBI::st=HASH(0x81f51d8)
> ERROR: parser: parse error at or near ""
> error 7 recorded: ERROR: parser: parse error at or near ""
> !! ERROR: 7 'ERROR: parser: parse error at or near ""
> '
> <- execute= undef at DBIStore.pm line 143.
>
> Is Postgres getting confused by the session information in the last field?
>
> I have no problems with DBI connections using perl and postgres

see: http://www.postgresql.org/mhonarc/pgsql-general/1999-10/msg00245.html

I've also seen code that does a pack("H*", nfreeze $session->{data});

-- Wendell
Re: Apache::Session::DBIStore and pgsql [ In reply to ]
That did the trick!

Did you experience semaphore problems as well?

> see: http://www.postgresql.org/mhonarc/pgsql-general/1999-10/msg00245.html
>
> I've also seen code that does a pack("H*", nfreeze $session->{data});
>
> -- Wendell

--

Adam Cassar
Senior Web Developer
___________________________________________
NetRegistry http://www.netregistry.com.au
Tel: +61 2 9699 6099 | Fax: +61 2 9699 6088
PO Box 270 Broadway NSW 2007 Australia