From: Matt R. <ma...@fr...> - 2006-03-21 21:52:16
|
Is it possible to have SquirrelSpell maintain its user dictionaries in SQL instead of in flat files? We use a db backend for both our address books and user prefs and would like to use a db for the dictionaries as well since we run SM on a load balanced web farm. I didn't see any indication this was possible in the doc or in my searches of the list archives or google (might have been searching for the wrong thing though). I was wondering if anyone else had tried to do this and if they were successful. Thanks. Matthew Ruzicka - Systems Administrator Front Range Internet, Inc. ma...@fr... - (970) 212-0728 |
From: Jonathan A. <jo...@sq...> - 2006-03-22 04:07:00
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, March 21, 2006 15:52, Matt Ruzicka wrote: > Is it possible to have SquirrelSpell maintain its user dictionaries in > SQL instead of in flat files? We use a db backend for both our address > books and user prefs and would like to use a db for the dictionaries as > well since we run SM on a load balanced web farm. I believe the version in SquirrelMail 1.5.1 and higher (development releases) support DB storage. In fact, the one in 1.5.1 and higher uses the same functions used to save preferences, so it is stored wherever you= r preferences are stored. Without any amount of testing, I would imagine that you should be able to use the version of SquirrelSpell from the 1.5.= 1 release on your stable branch. As a side note, it does automagically upgrade the words file if you have one available already. - --=20 Jonathan Angliss <jo...@sq...> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iEYEARECAAYFAkQgzTEACgkQK4PoFPj9H3MiYgCg9j2VzuGlERQgoLsS9hrFVPmH sxYAoNWvFGjgoFdERqxZfND5uLd2lRRw =3DWFZf -----END PGP SIGNATURE----- |
From: Tomas K. <to...@us...> - 2006-03-22 07:06:44
|
> Is it possible to have SquirrelSpell maintain its user dictionaries in SQL > instead of in flat files? We use a db backend for both our address books > and user prefs and would like to use a db for the dictionaries as well > since we run SM on a load balanced web farm. > > I didn't see any indication this was possible in the doc or in my searches > of the list archives or google (might have been searching for the wrong > thing though). I was wondering if anyone else had tried to do this and if > they were successful. SquirrelSpell plugin in 1.5.1 uses generic SquirrelMail preference functions and can store data in database. Plugin depends on checkForJavascript() and ngettext() functions. In 1.4.x checkForJavascript() function is provided by compatibility plugin. ngettext support requires many changes in SquirrelMail code and compatibility plugin can't support it without some hacks. ngettext is also provided by PHP 4.2.0+ gettext extension. If you have installed compatibility v.2 plugin and have PHP 4.2 or newer with gettext support, you should be able to use SquirrelSpell from 1.5.1. Some plugin strings are different and will remain in English. If I remember correctly, all changes that switch plugin from username.words to generic functions are submitted in one cvs commit or on same day. -- Tomas |
From: Matt R. <ma...@fr...> - 2006-03-30 23:58:33
|
I finally got around to implementing this so I figured I'd post my results. I went ahead and grabbed the 1.5.2-cvs plugins (20060331), moved the original 1.4.6 squirrelspell plugin offline and copied the 1.5.1 squirrelspell plugin into its place. I then grabbed the latest compatibility plugin (2.0.4) and patched the source with it. Partially out of laziness and partially out of a distrust of making php install changes I went ahead and replaced the ngettext line in new check_me.mod with the old one instead of recompiling with gettext. I'm assuming this would only lose me translation and numeral word correctness figuring I could regain this functionality when 1.5 is ready for prime time. All and all pretty painless and it's nice to have the user dicts in sql. Thanks for the assistance, and as always, thanks for all the hard work on SM. Matthew Ruzicka - Systems Administrator Front Range Internet, Inc. ma...@fr... - (970) 212-0728 Got SPAM? Take back your email with MailArmory. http://www.MailArmory.com On Wed, 22 Mar 2006, Tomas Kuliavas wrote: >> Is it possible to have SquirrelSpell maintain its user dictionaries in SQL >> instead of in flat files? We use a db backend for both our address books >> and user prefs and would like to use a db for the dictionaries as well >> since we run SM on a load balanced web farm. >> >> I didn't see any indication this was possible in the doc or in my searches >> of the list archives or google (might have been searching for the wrong >> thing though). I was wondering if anyone else had tried to do this and if >> they were successful. > > SquirrelSpell plugin in 1.5.1 uses generic SquirrelMail preference > functions and can store data in database. Plugin depends on > checkForJavascript() and ngettext() functions. In 1.4.x > checkForJavascript() function is provided by compatibility plugin. > ngettext support requires many changes in SquirrelMail code and > compatibility plugin can't support it without some hacks. ngettext is also > provided by PHP 4.2.0+ gettext extension. > > If you have installed compatibility v.2 plugin and have PHP 4.2 or newer > with gettext support, you should be able to use SquirrelSpell from 1.5.1. > > Some plugin strings are different and will remain in English. > > If I remember correctly, all changes that switch plugin from > username.words to generic functions are submitted in one cvs commit or on > same day. > > -- > Tomas > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > -- > squirrelmail-users mailing list > Posting Guidelines: http://www.squirrelmail.org/wiki/MailingListPostingGuidelines > List Address: squ...@li... > List Archives: http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user > List Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=2995 > List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users > |
From: Jonathan A. <jo...@sq...> - 2006-04-24 14:29:31
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Matt, On Thursday, March 30, 2006, Matt wrote: > I finally got around to implementing this so I figured I'd post my > results. > I went ahead and grabbed the 1.5.2-cvs plugins (20060331), moved the > original 1.4.6 squirrelspell plugin offline and copied the 1.5.1 > squirrelspell plugin into its place. I then grabbed the latest > compatibility plugin (2.0.4) and patched the source with it. Partially > out of laziness and partially out of a distrust of making php install > changes I went ahead and replaced the ngettext line in new check_me.mod > with the old one instead of recompiling with gettext. I'm assuming this > would only lose me translation and numeral word correctness figuring I > could regain this functionality when 1.5 is ready for prime time. > All and all pretty painless and it's nice to have the user dicts in sql. > Thanks for the assistance, and as always, thanks for all the hard work on > SM. As you've done the leg work, want to submit a patch for the SquirrelSpell plugin? I don't believe the compatibility plugin is needed for SquirrelSpell, so just a patch for the SquirrelSpell plugin would be great. Would save us a bit of duplicated work ;) - -- Jonathan Angliss <jo...@sq...> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (MingW32) iD8DBQFETOC0K4PoFPj9H3MRAq1BAKCTvO+1TXex7EE5Y2KkhlaqhJ6D4QCg2Zq8 inCyUY+XgHPC0qrj38dmcCE= =dzF0 -----END PGP SIGNATURE----- |
From: Matt R. <ma...@fr...> - 2006-04-24 22:18:50
|
It had been awhile since I looked at this project and needed to revisit it anyway. I just went ahead and grabbed the latest CSV snapshot for the 1.5.2 plugins (plugins-20060405_0000-CVS.devel.tar.gz) and tested it on a near vanilla (altering config/config.php for it to work) install of CVS snapshot for 1.4.7 (squirrelmail-20060405_0000-CVS.stable.tar.gz). With the following patch it appears to work just fine with the 1.4.x tree. I did not install the compatibility plugin btw. Hope this is what you were looking for.. It's pretty much out of the box. Note: this is for plugins-20060405_0000-CVS.devel.tar.gz. Index: squirrelspell/modules/check_me.mod =================================================================== --- squirrelspell/modules/check_me.mod Sun Feb 5 05:23:03 2006 +++ squirrelspell/modules/check_me.mod Mon Apr 24 12:02:46 2006 @@ -339,7 +339,7 @@ <tr> <td bgcolor="<?php echo $color[9] ?>" align="center"> <b> - <?php printf( ngettext("Found %d error","Found %d errors",$errors), $errors ) ?> + <?php printf( _("Found %s errors"), $errors ) ?> </b> </td> </tr> Thanks. Matthew Ruzicka - Systems Administrator Front Range Internet, Inc. ma...@fr... - (970) 212-0728 Got SPAM? Take back your email with MailArmory. http://www.MailArmory.com On Mon, 24 Apr 2006, Jonathan Angliss wrote: > Hi Matt, > On Thursday, March 30, 2006, Matt wrote: >> I finally got around to implementing this so I figured I'd post my >> results. > >> I went ahead and grabbed the 1.5.2-cvs plugins (20060331), moved the >> original 1.4.6 squirrelspell plugin offline and copied the 1.5.1 >> squirrelspell plugin into its place. I then grabbed the latest >> compatibility plugin (2.0.4) and patched the source with it. Partially >> out of laziness and partially out of a distrust of making php install >> changes I went ahead and replaced the ngettext line in new check_me.mod >> with the old one instead of recompiling with gettext. I'm assuming this >> would only lose me translation and numeral word correctness figuring I >> could regain this functionality when 1.5 is ready for prime time. > >> All and all pretty painless and it's nice to have the user dicts in sql. > >> Thanks for the assistance, and as always, thanks for all the hard work on >> SM. > > As you've done the leg work, want to submit a patch for the > SquirrelSpell plugin? I don't believe the compatibility plugin is > needed for SquirrelSpell, so just a patch for the SquirrelSpell plugin > would be great. Would save us a bit of duplicated work ;) > > > -- > Jonathan Angliss > <jo...@sq...> > > [ PGP Signature ok - Mon Apr 24 16:10:42 MDT 2006 ] > |
From: Matt R. <ma...@fr...> - 2006-04-25 20:01:47
|
Hmm.. Not sure how this was working initially. I must have only tested compose and not reply. The 1.5.x SquirrelSpell does need the compatibility plugin to be installed for it work with 1.4.x or else the checkForJavascript() function doesn't exist. Looking back at my emails it looks like Tomas Kuliavas pointed this out, but I'd evidently forgotten. Matthew Ruzicka - Systems Administrator Front Range Internet, Inc. ma...@fr... - (970) 212-0728 Got SPAM? Take back your email with MailArmory. http://www.MailArmory.com On Mon, 24 Apr 2006, Matt Ruzicka wrote: > It had been awhile since I looked at this project and needed to revisit it > anyway. I just went ahead and grabbed the latest CSV snapshot for the 1.5.2 > plugins (plugins-20060405_0000-CVS.devel.tar.gz) and tested it on a near > vanilla (altering config/config.php for it to work) install of CVS snapshot > for 1.4.7 (squirrelmail-20060405_0000-CVS.stable.tar.gz). With the following > patch it appears to work just fine with the 1.4.x tree. I did not install > the compatibility plugin btw. > > Hope this is what you were looking for.. It's pretty much out of the box. > > Note: this is for plugins-20060405_0000-CVS.devel.tar.gz. > > > Index: squirrelspell/modules/check_me.mod > =================================================================== > --- squirrelspell/modules/check_me.mod Sun Feb 5 05:23:03 2006 > +++ squirrelspell/modules/check_me.mod Mon Apr 24 12:02:46 2006 > @@ -339,7 +339,7 @@ > <tr> > <td bgcolor="<?php echo $color[9] ?>" align="center"> > <b> > - <?php printf( ngettext("Found %d error","Found %d errors",$errors), > $errors ) ?> > + <?php printf( _("Found %s errors"), $errors ) ?> > </b> > </td> > </tr> > > > Thanks. > > Matthew Ruzicka - Systems Administrator > Front Range Internet, Inc. > ma...@fr... - (970) 212-0728 > > Got SPAM? Take back your email with MailArmory. http://www.MailArmory.com > > On Mon, 24 Apr 2006, Jonathan Angliss wrote: > >> Hi Matt, >> On Thursday, March 30, 2006, Matt wrote: >>> I finally got around to implementing this so I figured I'd post my >>> results. >> >>> I went ahead and grabbed the 1.5.2-cvs plugins (20060331), moved the >>> original 1.4.6 squirrelspell plugin offline and copied the 1.5.1 >>> squirrelspell plugin into its place. I then grabbed the latest >>> compatibility plugin (2.0.4) and patched the source with it. Partially >>> out of laziness and partially out of a distrust of making php install >>> changes I went ahead and replaced the ngettext line in new check_me.mod >>> with the old one instead of recompiling with gettext. I'm assuming this >>> would only lose me translation and numeral word correctness figuring I >>> could regain this functionality when 1.5 is ready for prime time. >> >>> All and all pretty painless and it's nice to have the user dicts in sql. >> >>> Thanks for the assistance, and as always, thanks for all the hard work on >>> SM. >> >> As you've done the leg work, want to submit a patch for the >> SquirrelSpell plugin? I don't believe the compatibility plugin is >> needed for SquirrelSpell, so just a patch for the SquirrelSpell plugin >> would be great. Would save us a bit of duplicated work ;) >> >> >> -- >> Jonathan Angliss >> <jo...@sq...> >> >> [ PGP Signature ok - Mon Apr 24 16:10:42 MDT 2006 ] >> > |
From: Matt R. <ma...@fr...> - 2006-04-25 22:54:48
|
Ok, you might want to ignore this patch for now. I'm really not sure what happened, but this had been working for me in the past, but now it does not seem to be working properly. I re-installed SM into a new directory, configured SM to use our DB for prefs and re-installed SquirrelSpell from the 1.5 tree. When I click reply I'm getting the error: "Fatal error: session_register() [<a href='function.session-register'>function.session-register</a>]: Failed to initialize storage module: user (path: /tmp) in /u/mattr/public_html/squirrelmail.stable/functions/global.php on line 151" If I disable the SquirrelSpell plugin the error goes away so I'm guessing it is related to SS trying to register or get the session. I'm not sure if this is a result of me not having old file based dictionaries to be up graded or if it is a problem with me not having a data/ directory specified in config/config.php since we put everything into sql. I'm looking into adding 'php_value session.save_handler "files"' to my apache config, but I need to research what exactly this is doing and why it started being a problem first. I can see that the local value for this directory appears to have session.save_handler set to user so I guess this might be the problem. I'm not sure if I was getting positive results from this earlier due to a "beneficial" interaction with another plugin I was running last time or what. Sorry for all the noise related to this. I thought it was a slamdunk, but obviously I've confused something along the way or have a new variable that I'm not aware of. I'd really like to get this working for my users so I will keep banging on it and give an update if I can find a solution. Matthew Ruzicka - Systems Administrator Front Range Internet, Inc. ma...@fr... - (970) 212-0728 Got SPAM? Take back your email with MailArmory. http://www.MailArmory.com On Tue, 25 Apr 2006, Matt Ruzicka wrote: > Hmm.. Not sure how this was working initially. I must have only tested > compose and not reply. The 1.5.x SquirrelSpell does need the compatibility > plugin to be installed for it work with 1.4.x or else the > checkForJavascript() function doesn't exist. Looking back at my emails it > looks like Tomas Kuliavas pointed this out, but I'd evidently forgotten. > > Matthew Ruzicka - Systems Administrator > Front Range Internet, Inc. > ma...@fr... - (970) 212-0728 > > Got SPAM? Take back your email with MailArmory. http://www.MailArmory.com > > On Mon, 24 Apr 2006, Matt Ruzicka wrote: > >> It had been awhile since I looked at this project and needed to revisit it >> anyway. I just went ahead and grabbed the latest CSV snapshot for the >> 1.5.2 plugins (plugins-20060405_0000-CVS.devel.tar.gz) and tested it on a >> near vanilla (altering config/config.php for it to work) install of CVS >> snapshot for 1.4.7 (squirrelmail-20060405_0000-CVS.stable.tar.gz). With >> the following patch it appears to work just fine with the 1.4.x tree. I >> did not install the compatibility plugin btw. >> >> Hope this is what you were looking for.. It's pretty much out of the box. >> >> Note: this is for plugins-20060405_0000-CVS.devel.tar.gz. >> >> >> Index: squirrelspell/modules/check_me.mod >> =================================================================== >> --- squirrelspell/modules/check_me.mod Sun Feb 5 05:23:03 2006 >> +++ squirrelspell/modules/check_me.mod Mon Apr 24 12:02:46 2006 >> @@ -339,7 +339,7 @@ >> <tr> >> <td bgcolor="<?php echo $color[9] ?>" align="center"> >> <b> >> - <?php printf( ngettext("Found %d error","Found %d errors",$errors), >> $errors ) ?> >> + <?php printf( _("Found %s errors"), $errors ) ?> >> </b> >> </td> >> </tr> >> >> >> Thanks. >> >> Matthew Ruzicka - Systems Administrator >> Front Range Internet, Inc. >> ma...@fr... - (970) 212-0728 >> >> Got SPAM? Take back your email with MailArmory. http://www.MailArmory.com >> >> On Mon, 24 Apr 2006, Jonathan Angliss wrote: >> >>> Hi Matt, >>> On Thursday, March 30, 2006, Matt wrote: >>>> I finally got around to implementing this so I figured I'd post my >>>> results. >>> >>>> I went ahead and grabbed the 1.5.2-cvs plugins (20060331), moved the >>>> original 1.4.6 squirrelspell plugin offline and copied the 1.5.1 >>>> squirrelspell plugin into its place. I then grabbed the latest >>>> compatibility plugin (2.0.4) and patched the source with it. Partially >>>> out of laziness and partially out of a distrust of making php install >>>> changes I went ahead and replaced the ngettext line in new check_me.mod >>>> with the old one instead of recompiling with gettext. I'm assuming this >>>> would only lose me translation and numeral word correctness figuring I >>>> could regain this functionality when 1.5 is ready for prime time. >>> >>>> All and all pretty painless and it's nice to have the user dicts in sql. >>> >>>> Thanks for the assistance, and as always, thanks for all the hard work on >>>> SM. >>> >>> As you've done the leg work, want to submit a patch for the >>> SquirrelSpell plugin? I don't believe the compatibility plugin is >>> needed for SquirrelSpell, so just a patch for the SquirrelSpell plugin >>> would be great. Would save us a bit of duplicated work ;) >>> >>> >>> -- >>> Jonathan Angliss >>> <jo...@sq...> >>> >>> [ PGP Signature ok - Mon Apr 24 16:10:42 MDT 2006 ] >>> >> > |
From: Tomas K. <to...@us...> - 2006-04-26 09:28:17
|
> Ok, you might want to ignore this patch for now. I'm really not sure what > happened, but this had been working for me in the past, but now it does > not seem to be working properly. I re-installed SM into a new directory, > configured SM to use our DB for prefs and re-installed SquirrelSpell from > the 1.5 tree. When I click reply I'm getting the error: > > "Fatal error: session_register() [<a > href='function.session-register'>function.session-register</a>]: Failed to > initialize storage module: user (path: /tmp) in > /u/mattr/public_html/squirrelmail.stable/functions/global.php on line 151" > > If I disable the SquirrelSpell plugin the error goes away so I'm guessing > it is related to SS trying to register or get the session. I'm not sure > if this is a result of me not having old file based dictionaries to be up > graded or if it is a problem with me not having a data/ directory > specified in config/config.php since we put everything into sql. > > I'm looking into adding 'php_value session.save_handler "files"' to my > apache config, but I need to research what exactly this is doing and why > it started being a problem first. I can see that the local value for this > directory appears to have session.save_handler set to user so I guess this > might be the problem. > > I'm not sure if I was getting positive results from this earlier due to a > "beneficial" interaction with another plugin I was running last time or > what. > > Sorry for all the noise related to this. I thought it was a slamdunk, but > obviously I've confused something along the way or have a new variable > that I'm not aware of. I'd really like to get this working for my users > so I will keep banging on it and give an update if I can find a solution. this error is not related to plugin. It is specific to your setup. I think php scripts restarted session and your custom session handler broke. |
From: Matt R. <ma...@fr...> - 2006-04-26 16:47:29
|
On Wed, 26 Apr 2006, Tomas Kuliavas wrote: >> Sorry for all the noise related to this. I thought it was a slamdunk, but >> obviously I've confused something along the way or have a new variable >> that I'm not aware of. I'd really like to get this working for my users >> so I will keep banging on it and give an update if I can find a solution. > > this error is not related to plugin. It is specific to your setup. I think > php scripts restarted session and your custom session handler broke. Hmm.. not really sure what the deal is with our sessions then, but since our web master is on vacation I decided to find another solution. Here is a new patch that uses the same logic as the current 1.4.x SquirrelSpell plugin as it applies to new functionality in the 1.5.x source. This one has the added benefit of not needing the compatibility plugin. It changes the reference to ngettext and checkForJavaScript back to the methods used in the same place in the 1.4.x version. New testing indicates this seems to work as expected. Sorry again for the confusion. ===== START PATCH ===== diff -ur squirrelspell.orig/modules/check_me.mod squirrelspell/modules/check_me.mod --- squirrelspell.orig/modules/check_me.mod Sun Feb 5 05:23:03 2006 +++ squirrelspell/modules/check_me.mod Mon Apr 24 12:14:29 2006 @@ -339,7 +339,7 @@ <tr> <td bgcolor="<?php echo $color[9] ?>" align="center"> <b> - <?php printf( ngettext("Found %d error","Found %d errors",$errors), $errors ) ?> + <?php printf( _("Found %s errors"), $errors ) ?> </b> </td> </tr> Only in squirrelspell/modules: check_me.mod.orig diff -ur squirrelspell.orig/sqspell_functions.php squirrelspell/sqspell_functions.php --- squirrelspell.orig/sqspell_functions.php Sun Feb 5 04:32:33 2006 +++ squirrelspell/sqspell_functions.php Wed Apr 26 10:15:52 2006 @@ -58,7 +58,7 @@ * Check if this browser is capable of displaying SquirrelSpell * correctly. */ - if (checkForJavascript()) { + if (!soupNazi()) { /** * Some people may choose to disable javascript even though their * browser is capable of using it. So these freaks don't complain, ===== END PATCH ===== Matthew Ruzicka - Systems Administrator Front Range Internet, Inc. ma...@fr... - (970) 212-0728 |
From: Tomas K. <to...@us...> - 2006-04-26 17:59:17
|
>>> Sorry for all the noise related to this. I thought it was a slamdunk, >>> but >>> obviously I've confused something along the way or have a new variable >>> that I'm not aware of. I'd really like to get this working for my >>> users >>> so I will keep banging on it and give an update if I can find a >>> solution. >> >> this error is not related to plugin. It is specific to your setup. I >> think >> php scripts restarted session and your custom session handler broke. > > Hmm.. not really sure what the deal is with our sessions then, but since > our web master is on vacation I decided to find another solution. shouldn't be hard to find session_commit(), session_write_close() and session_destroy() calls. -- Tomas |