[imp] Preferences still not saved in DB ... *more logs*

Jon Parise jon@horde.org
Mon, 6 Aug 2001 18:40:49 -0400


On Mon, Aug 06, 2001 at 05:47:44PM -0400, Frederic Trudeau wrote:

> Jon, it seems the problem doesnt lie where you first though. I tried to
> make IMP 'remember' that I wanted to have 40 max messages outputed per
> page, which is pretty clear in the logs below. The data passed is very
> clear, nothing seems broken here.
> 
> Nothing was inserted in the database. Why ?
> 
> (And btw, UID isnt suppose to be a unique random string of 32 characters?)
> 
> 
> 010806 17:36:18    1539 Connect    hordemgr@localhost on
>                    1539 Init DB    horde
>                    1539 Query      insert into horde_prefs (uid, scope,
> pref_name, pref_value) values(ftrudeau, imp, max_msgs, 40)
>                    1539 Query      update horde_prefs set pref_value = 40
> where uid = ftrudeau and pref_name = max_msgs and scope = imp

Those string values should be quoted.  You need to update your
PEAR DB installation.
 
> In the exact same session, with the same PHP/IMP/Horde setup (I didnt
> change anything since my last post), I tried to create a new Identity, in
> vain. But the data passed via PHP is indeed broken, as you said.
> 
> 010806 17:38:43    1541 Connect    hordemgr@localhost on
>                    1541 Init DB    horde
>                    1541 Query      insert into horde_prefs (uid, scope,
> pref_name, pref_value) values(ftrudeau, horde, identities,
> a:2:{i:0;a:7:{s:2:"id";s:16:"Default
> identity";s:8:"fullname";s:0:"";s:9:"from_addr";s:0:"";s:12:"replyto_addr";s:0:"";s:9:"signature";s:0:"";s:10:"sig_dashes";i:0;s:9:"sig_first";i:0;}i:1;a:7:{s:2:"id";s:8:"ftrudeau";s:8:"fullname";s:16:"Frederic
> Trudeau";s:9:"from_addr";s:16:"ftrudeau@cam.org";s:12:"replyto_addr";s:0:"";s:9:"signature";s:4:"test";s:10:"sig_dashes";s:1:"1";s:9:"sig_first";i:0;}})
>                    1541 Query      update horde_prefs set pref_value =
> a:2:{i:0;a:7:{s:2:"id";s:16:"Default
> identity";s:8:"fullname";s:0:"";s:9:"from_addr";s:0:"";s:12:"replyto_addr";s:0:"";s:9:"signature";s:0:"";s:10:"sig_dashes";i:0;s:9:"sig_first";i:0;}i:1;a:7:{s:2:"id";s:8:"ftrudeau";s:8:"fullname";s:16:"Frederic
> Trudeau";s:9:"from_addr";s:16:"ftrudeau@cam.org";s:12:"replyto_addr";s:0:"";s:9:"signature";s:4:"test";s:10:"sig_dashes";s:1:"1";s:9:"sig_first";i:0;}}
> where uid = ftrudeau and pref_name = identities and scope = horde
 
Ah, I didn't realize that the new identity stuff stored those
values as serialized arrays.  That was the source of my "broken"
comments, which was invalid.
 
-- 
Jon Parise (jon@csh.rit.edu)  .  Rochester Inst. of Technology
http://www.csh.rit.edu/~jon/  :  Computer Science House Member