[ic] Newb Postgres Session Setup
Jason Lee
jason.lee at mac.com
Thu Jul 31 14:02:34 EDT 2003
Hello all,
During my past two weeks of using Interchange, I've been really
resisting sending a question to the list. However, I think I've run out
of options.
OS: RH 7.3 (latest updates)
Db: Postgres 7.3
I: 4.9.8-1 (via rpms)
I've followed the instructions via these two posts:
http://www.icdevgroup.org/pipermail/interchange-users/2002-July/
023347.html
http://www.icdevgroup.org/pipermail/interchange-users/2001-April/
007636.html
and have adapted it to Postgres vs. MySql. My db structure is as
follows:
- - - [31/July/2003:13:08:49 -0400] - - table user_sessions created:
create table user_sessions (
> code varchar(64) NOT NULL PRIMARY KEY,
> session text,
> sessionlock varchar(64),
> last_accessed varchar(32)
> )
(The varchar(32) for last_accessed vs. timestamp made no difference.)
I *think* the above is ok since I am getting entries in the table for
the code and sessionlock columns.
psql snip:
store=# select * from user_sessions;
code | session | sessionlock | last_accessed
------------------------+---------+-----------------+---------------
uQDspeRN:XX.XX.XXX.XXX | | 1059672559:5453 |
RqeIRN8f:XX.XX.XXX.XXX | | 1059672562:5456 |
(2 rows)
[ip addrs above have been masked]
So when the session column gets inserted, the DBI.pm file dies with the
following error:
[31/July/2003:13:09:13 -0400] store /cgi-bin/store/index.html Runtime
error: DBD::Pg::db do failed: ERROR: parser: unterminated quoted
string at or near "'123" at character 36 at
/usr/lib/interchange/lib/Vend/Table/DBI.pm line 1613.
(Line 1613 is being reported due to a debug statement I inserted at
line 1612, which is where the error would be thrown on a stock install)
I've looked here as well as other sites regarding the quoted error and
they all seem to point to some sort of unclosed quote. I've put in some
debug code in the DBI.pm file to see what was going on and I think it
might be related to null values being part of the session itself and
them not being escaped properly. Apparently, Postgres and perl have
some issues with it - from what I've read on other posts elsewhere.
But, I'm not at that point in my project where I can dive deep into the
.pm files and start tinkering.
So I guess I'm looking for a way around this - if it exists. I can move
sessions back onto the local file store, but ultimately, I want to be
able to use the db in the future for clustering support. Has anyone
successfully got this to work with Postgres, or is it a MySql thing
only.
I'm really having a good time getting Interchange up and going. You
guys have done a great job :)
Thanks in advance.
- Jason
More information about the interchange-users
mailing list