1.4.15 and sql based user_prefs not working ?

View: New views
4 Messages — Rating Filter:   Alert me  

1.4.15 and sql based user_prefs not working ?

by Benny Pedersen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


well i found this is the problem, when i use filebased user prefs all is
working with the identity, but when i add sql based user_prefs i get
multiple  pref_key and pref_val pr user

INSERT INTO `userprefs` VALUES('me@...', 'trash_folder', 'Trash');
INSERT INTO `userprefs` VALUES('me@...', 'trash_folder', 'Trash');
INSERT INTO `userprefs` VALUES('me@...', 'trash_folder', 'Trash');
INSERT INTO `userprefs` VALUES('me@...', 'trash_folder', 'Trash');
INSERT INTO `userprefs` VALUES('me@...', 'trash_folder', 'Trash');
INSERT INTO `userprefs` VALUES('me@...', 'trash_folder', 'Trash');
INSERT INTO `userprefs` VALUES('me@...', 'sent_folder', 'Sent');
INSERT INTO `userprefs` VALUES('me@...', 'sent_folder', 'Sent');
INSERT INTO `userprefs` VALUES('me@...', 'sent_folder', 'Sent');
INSERT INTO `userprefs` VALUES('me@...', 'sent_folder', 'Sent');
INSERT INTO `userprefs` VALUES('me@...', 'sent_folder', 'Sent');
INSERT INTO `userprefs` VALUES('me@...', 'mailfetch_newlog', 'on');
INSERT INTO `userprefs` VALUES('me@...', 'mailfetch_newlog', 'on');

something like this above :/

i dont know if this olso goes for older versions of squirrelmail, but
1.4.15 is the first that shows me the problem in identity :(

i tryed to find info on how to configure sql prefs but no info in the
tarball about it :(

if more info is needed please tell me how to provide it




-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
-----
squirrelmail-plugins mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-plugins@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.plugins
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-plugins

Re: 1.4.15 and sql based user_prefs not working ?

by Paul Lesniewski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Jun 21, 2008 at 9:09 AM, Benny Pedersen <me@...> wrote:
>
> well i found this is the problem, when i use filebased user prefs all is
> working with the identity, but when i add sql based user_prefs i get
> multiple  pref_key and pref_val pr user

You don't give much information about these queries - are they from
the same page request?  Sounds like something funny with your server,
as there is no reason I can think of that SM would repeat itself like
this, 6 times for one pref, 5 for another and 2 for yet one more.

> INSERT INTO `userprefs` VALUES('me@...', 'trash_folder', 'Trash');
> INSERT INTO `userprefs` VALUES('me@...', 'trash_folder', 'Trash');
> INSERT INTO `userprefs` VALUES('me@...', 'trash_folder', 'Trash');
> INSERT INTO `userprefs` VALUES('me@...', 'trash_folder', 'Trash');
> INSERT INTO `userprefs` VALUES('me@...', 'trash_folder', 'Trash');
> INSERT INTO `userprefs` VALUES('me@...', 'trash_folder', 'Trash');
> INSERT INTO `userprefs` VALUES('me@...', 'sent_folder', 'Sent');
> INSERT INTO `userprefs` VALUES('me@...', 'sent_folder', 'Sent');
> INSERT INTO `userprefs` VALUES('me@...', 'sent_folder', 'Sent');
> INSERT INTO `userprefs` VALUES('me@...', 'sent_folder', 'Sent');
> INSERT INTO `userprefs` VALUES('me@...', 'sent_folder', 'Sent');
> INSERT INTO `userprefs` VALUES('me@...', 'mailfetch_newlog', 'on');
> INSERT INTO `userprefs` VALUES('me@...', 'mailfetch_newlog', 'on');
>
> something like this above :/
>
> i dont know if this olso goes for older versions of squirrelmail, but
> 1.4.15 is the first that shows me the problem in identity :(
>
> i tryed to find info on how to configure sql prefs but no info in the
> tarball about it :(
>
> if more info is needed please tell me how to provide it

Well, think.... maybe you could show the configuration settings you
changed to implement sql-based prefs?  Maybe details about your sql
db, maybe the schema for the prefs db?  Maybe an actual snippet of the
query log you are looking at.  YOU can come up with these things
yourself I think - I want to believe you aren't clueless - prove me
right.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
-----
squirrelmail-plugins mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-plugins@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.plugins
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-plugins

Re: 1.4.15 and sql based user_prefs not working ?

by Tomas Kuliavas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Benny Pedersen wrote:
well i found this is the problem, when i use filebased user prefs all is
working with the identity, but when i add sql based user_prefs i get
multiple  pref_key and pref_val pr user

INSERT INTO `userprefs` VALUES('me@junc.org', 'trash_folder', 'Trash');
INSERT INTO `userprefs` VALUES('me@junc.org', 'trash_folder', 'Trash');
INSERT INTO `userprefs` VALUES('me@junc.org', 'trash_folder', 'Trash');
INSERT INTO `userprefs` VALUES('me@junc.org', 'trash_folder', 'Trash');
INSERT INTO `userprefs` VALUES('me@junc.org', 'trash_folder', 'Trash');
INSERT INTO `userprefs` VALUES('me@junc.org', 'trash_folder', 'Trash');
INSERT INTO `userprefs` VALUES('me@junc.org', 'sent_folder', 'Sent');
INSERT INTO `userprefs` VALUES('me@junc.org', 'sent_folder', 'Sent');
INSERT INTO `userprefs` VALUES('me@junc.org', 'sent_folder', 'Sent');
INSERT INTO `userprefs` VALUES('me@junc.org', 'sent_folder', 'Sent');
INSERT INTO `userprefs` VALUES('me@junc.org', 'sent_folder', 'Sent');
INSERT INTO `userprefs` VALUES('me@junc.org', 'mailfetch_newlog', 'on');
INSERT INTO `userprefs` VALUES('me@junc.org', 'mailfetch_newlog', 'on');

something like this above :/

i dont know if this olso goes for older versions of squirrelmail, but
1.4.15 is the first that shows me the problem in identity :(

i tryed to find info on how to configure sql prefs but no info in the
tarball about it :(
See http://www.squirrelmail.org/docs/admin/admin-5.html#ss5.7

You haven't set primary key for userprefs table.



Re: 1.4.15 and sql based user_prefs not working ?

by Benny Pedersen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> See http://www.squirrelmail.org/docs/admin/admin-5.html#ss5.7
> You haven't set primary key for userprefs table.

this link solved my problem, thanks, after i see this link i remember it
was when i changed from mysql 4.0.x to 4.1.x and again later to 5.0.x that
i got problem with it and newer solved it becurse of unicode setup in
mysql :/

so at that time i deletede the keys bad thinked from me, now i got it done
this time, its olso like playing in lotto with

CREATE TABLE userprefs (
  user varchar(128) DEFAULT '' NOT NULL,
  prefkey varchar(64) DEFAULT '' NOT NULL,
  prefval BLOB DEFAULT '' NOT NULL,
  PRIMARY KEY (user,prefkey)
);

this is 4.0.x

in 4.1.x mysql is like this

CREATE TABLE `userprefs` (
  `username` varchar(128) NOT NULL,
  `prefkey` varchar(64) NOT NULL,
  `prefval` blob NOT NULL,
  PRIMARY KEY  (`username`,`prefkey`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='squirrelmail prefs setings';

user is restricted in postgresql thats why i chenged it in mysql


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
-----
squirrelmail-plugins mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: squirrelmail-plugins@...
List archives: http://news.gmane.org/gmane.mail.squirrelmail.plugins
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-plugins
LightInTheBox - Buy quality products at wholesale price