[horde] horde 3.0.5, postgresql session handler fails

Chris Stromsoe cbs at cts.ucla.edu
Sat Oct 15 02:44:34 PDT 2005


On Mon, 10 Oct 2005, Chris Stromsoe wrote:

> On Sun, 9 Oct 2005, Chris Stromsoe wrote:
>
>> Anyway, the patch is attached to bug #2749.  It also includes some 
>> whitespace cleanup to make lines not wrap on an 80-column terminal, and 
>> removes some bogus calls to pg_free_result() that were inside of if 
>> (!$result) {} blocks.
>
> I updated the patch to try to replicate the way that read() and write() 
> are done in mysql.php.
>
> I have pgsql sessions working fine with turba, kronolith, nag, and 
> gollem, but I can't get imp to work.

The pgsql table horde_sessionhandler creates the column session_data as a 
text data type.  Imp inserts null characters in part of the session which 
end up being read back incorrectly, causing the session in-progress to be 
restarted.

I wrote a quick and dirty patch to convert the session to hex before 
inserting it into the table in write(), and from hex after reading from 
the table in read().

The patch is attached to bug #2789.  With CVS 
horde/lib/Horde/SessionHandler/pgsql.php and this patch, pgsql sessions 
are working for me.


-Chris


More information about the horde mailing list