Roundcube Community Forum

 

SpamAssassin MySQL patch

Started by JohnDoh, August 16, 2008, 11:44:16 AM

Previous topic - Next topic

JohnDoh

I have added a new version for the latest SVN to the site. It has the new address sync code that will work with the + sign as well as the addressbook.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...


maxxim

Hi,
I installed the plugin, now i get the spam screen in the user preferences section, but whenever i make a change to the spam settings i get an error that the changes cannot be made, and they are not saved.
A red error msg at the top of the screen saying: Cannot change spam settings.
Prolly missed something somewhere... any ideas ?

JohnDoh

double check everything in your config (plugins/sauserprefs/config.inc.php), make sure all the table and field names are correct. or may be add some debug statements to program/steps/settings/save_sauserprefs.inc, then you should be able to see the SQL queries its executing and hopefully where it is going wrong.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

maxxim

Thx for the reply, i made the mistake of setting the roundcube db in the settings, changed it into the spamassassin db and it works, i can see and change the settings.
I still get another error however.

DB Error in /home/www/mail/program/include/rcube_mdb2.php (255): _doQuery: [Error message: Could not execute statement]
[Last executed query: PREPARE mdb2_statement_mysql_3b6f80edc47aba5da41b5709a5637bdd739cafda7 FROM 'SELECT 1 FROM session\n WHERE sess_id=?']
[Native code: 1146]
[Native message: Table 'spamassassin.session' doesn't exist]

SERVICE CURRENTLY NOT AVAILABLE!

_doQuery: [Error message: Could not execute statement] [Last executed query: PREPARE mdb2_statement_mysql_3b6f80edc47aba5da41b5709a5637bdd739cafda7 FROM 'SELECT 1 FROM session\n WHERE sess_id=?'] [Native code: 1146] [Native message: Table 'spamassassin.session' doesn't exist]

JohnDoh

:S i'm not sure what has happened there, is it possible that you have got `$rcmail_config['db_dsnw']` and `$sauserprefs_config['db_dsnw']` mixed up? it looks like it is trying to use the spamassassin db when it should be using the roundcube one.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

maxxim

#51
Hi, i thought the same, but i checked....
$sauserprefs_config['db_dsnw'] = 'mysql://spam:xxx@localhost/spamassassin';
$rcmail_config['db_dsnw'] = 'mysql://roundcube:xxx@localhost/roundcubemail';

Seems ok, so somwhere the plugin is not correctly switching back to the correct db. The weird thing is that except for the error message it works, the settings are saved.

ok i found the prob. you cannot use the same user for both db's, i added another user and it works fine now.

JohnDoh

I can't see why that is happening I will have to do some more debugging, it only occurs when the username and pass are the same for both connections. Thanks for figuring out what the problem was.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

sobia

I installed this plugin n now when i click user settings tab, it gives me a blank page n the logs show;

PHP Warning:  include_once(textfield.php) [function.include-once]: failed to open stream: No such file or directory in /home/myserver/public_html/mail/program/include/iniset.php on line 93
[17-Feb-2009 07:52:28] PHP Warning:  include_once() [function.include]: Failed opening 'textfield.php' for inclusion (include_path='/home/myserver/public_html/mail/:/home/myserver/public_html/mail/program:/home/myserver/public_html/mail/program/lib:/home/myserver/public_html/mail/program/include:.:/usr/lib/php:/usr/local/lib/php') in /home/myserver/public_html/mail/program/include/iniset.php on line 93
[17-Feb-2009 07:52:28] PHP Fatal error:  Class 'textfield' not found in /home/myserver/public_html/mail/program/steps/settings/func.inc on line 43


is there a way i can uninstall the patch?

JohnDoh

hmmm thats a bit odd, I'm sorry about that. The patch doesn't make any changes to program/steps/settings/func.inc which is apparently where the problem is. Did the patch apply cleanly? What version of RC are you using?

To reverse a patch just run the command again with -R.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

gmusco

Hello, thx by the patch.

I had that modified the settingstabs.html file, adding  this lines:




Because i didnt see the tab "Spam", its right ?

Thx

Gabriel

JohnDoh

Its
<span id=&quot;settingstabsauserprefs&quot; class=&quot;tablink&quot;><roundcube:button command=&quot;sauserprefs&quot; type=&quot;link&quot; label=&quot;sauserprefs&quot; title=&quot;sauserprefssettings&quot; class=&quot;tablink&quot; /></span>
The title attribute is different from what you put but thats it, and you dont need
that is in the file already.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

winnetou

Hello everybody ;)

I'm new here. I'm using SA-user-prefs plugin - great thing and I've found some typo and misspellings in localization pl_PL.inc.
I've made some corretions and new version is available at my SVN repo

svn://valhalla.org.pl/sa-user-prefs

Didn't know where I should report this so I choose forum ;)


Best regards from Poland