[horde] pgsql_sessionhandler.sql not working?

Ron Cooper rcooper at jamesconeyisland.com
Tue Jul 8 22:09:48 PDT 2003


Quoting imp <imp at xtremedev.com>:


> It would seem that what you suggested resolved the issue. May I ask
> why  does the horde sessionhandler not use the $conf['sql'] params>
like all  the other handlers do? More for curiousity than anything >
>else.

You almost sound disappointed :).

Short answer is I think sql.php for pgsql is broken for session handling
because of the session_data field in the postgres table is defined as
TEX, but sql.php assumes it's Binary.

Long answer:

>From the error message you posted it looked to me that your session
strings were being truncated, probably because of the SQL::updateBlob()
or SQL::insertBlob() which last I checked, Postgres doesn't support the
mysql BLOB type, and your table structure for session_data in Postgres
is set to TEXT.  So sql.php was obviously trying to send binary session
data to a text field, and well it probably truncated on the first EOF
char sent to it.

The horde_sessionhandler  table session_data field:

is defined in pgsql as:   session_data TEXT
is defined in  mysql as:  session_data LONGBLOB
is defined in sapdb as:   session_data LONG BYTE

Gee, everybody is binary cept for Postgres.

Postgres has type 'BYTEA'  which provides _most_ of the functionality of
the binary string type per SQL99 4.3.  The big difference between
'BLOB' (MySQL) and 'BYTEA'  are the binary string literals, which in
BLOB is comprised of an even number of hex digits in single quotes
preceded by X, (X'3fd2fc') and the BYTEA string literals are comprised
of octets that are escaped by backslashes.

So is the table defined wrong or is the support lacking in sql.php for
TEXT or BYTEA defined fields?  I suppose you could change the
session_data field type from TEXT to BYTEA and use the configuration
from before and see if it craps out or not. I have no idea.

Course, those who really know the issues, plese do speak up :).

Ok enough.  Too much coffee tonight and I'm rambling on.

Ron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 963 bytes
Desc: PGP Public Key
Url : http://lists.horde.org/archives/horde/attachments/20030709/1a3a53ad/attachment-0002.bin


More information about the horde mailing list