Summary | Serialization issues with PHP 5 objects (Postgres) |
Queue | Horde Base |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 3. High |
Owners | slusarz (at) horde (dot) org |
Requester | slusarz (at) horde (dot) org |
Created | 03/31/2009 (5940 days ago) |
Due | |
Updated | 11/18/2009 (5708 days ago) |
Assigned | 04/16/2009 (5924 days ago) |
Resolved | 11/18/2009 (5708 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
changes have been made.
http://cvs.horde.org/diff.php/horde/scripts/upgrades/2009-04-13_horde_pgsql_upgrade.sql?rt=horde&r1=1.1&r2=1.2&ty=u
http://cvs.horde.org/diff.php/framework/Prefs/Prefs/sql.php?rt=horde&r1=1.133&r2=1.134&ty=u
the postgres sql scripts were updated.
A simple test is to see if you can create Virtual Folders in IMP 5 and
they are persistent between sessions.
postgres sql scripts were updated.
Summary ⇒ Serialization issues with PHP 5 objects (Postgres)
State ⇒ Assigned
and may contain null chars.
State ⇒ Feedback
Taken from
Assigned to Michael Slusarz
http://cvs.horde.org/diff.php/framework/Prefs/Prefs/sql.php?rt=horde&r1=1.132&r2=1.133&ty=u
http://cvs.horde.org/diff.php/framework/Prefs/Prefs/sql.php?rt=horde&r1=1.131&r2=1.132&ty=u
http://cvs.horde.org/diff.php/framework/Prefs/package.xml?rt=horde&r1=1.22&r2=1.23&ty=u
http://cvs.horde.org/diff.php/horde/docs/CHANGES?rt=horde&r1=1.1228&r2=1.1229&ty=u
http://cvs.horde.org/diff.php/horde/docs/UPGRADING?rt=horde&r1=1.31&r2=1.32&ty=u
http://cvs.horde.org/diff.php/horde/scripts/sql/create.pgsql.sql?rt=horde&r1=1.36&r2=1.37&ty=u
http://cvs.horde.org/co.php/horde/scripts/sql/horde_prefs.pgsql.sql?rt=horde&r=1.1
http://cvs.horde.org/co.php/horde/scripts/upgrades/2009-04-13_horde_pgsql_upgrade.sql?rt=horde&r=1.1
Summary ⇒ Serialization issues with PHP 5 objectss,
alter TABLE horde_prefs ALTER COLUMN pref_value TYPE BYTEA USING
decode(replace(pref_value, E'\\', E'\\\\'), 'escape');
object. Only can use serialize for that.
Verified that doing:
json_encode(serialize($foo))
will correctly save data with null characters.
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ Serialization issues with PHP 5 objects
Queue ⇒ Horde Base
Assigned to
Milestone ⇒
Patch ⇒ No
State ⇒ Assigned
representation of objects containing private/protected member
variables includes null characters. These NULL characters will
truncate database insertion - at least using Postgres 8.3 in TEXT
data. We use TEXT data for things like prefs, sessionhandler, cache,
and vfs.
See:
http://bugs.php.net/bug.php?id=29865
and
http://bugs.php.net/bug.php?id=45244
where the PHP folks claim this isn't a bug.
Possible solutions: vfs, sessionhandler, and cache should probably use
binary data (BYTEA on postgres). Not so sure about prefs, so we might
need a different storage solution there (base64/json).