Skip to main content
Welcome guest. | Register | Login | Post

Problems with MySQL tables when trying to use the drupal spam module

5 replies [Last post]
dylunio's picture
Offline
Joined: 2005-12-20

I've tried to install the Drupal Spam module on my site to try and curtail the spam I'm reciving. I've followed the instructions in the INSTALL.txt file, but I now get errors pertaining to the module on my site.

The errors are about missing MySQL tables which the module is expecting e.g.

Quote:

* user warning: Table 'drupal.spam_log' doesn't exist query: INSERT INTO spam_log (hostname, source, id, uid, entry, timestamp) VALUES('192.168.1.19', 'comment', 190, 1, 'spam_comment: deleting comment \"Foo!\"', 1158947649) in /var/www/localhost/htdocs/drupal/includes/database.mysql.inc on line 120.
* user warning: Table 'drupal.spam_tracker' doesn't exist query: DELETE FROM spam_tracker WHERE id = 190 AND source = 'comment' in /var/www/localhost/htdocs/drupal/includes/database.mysql.inc on line 120.

I sadly know nothing about MySQL, and very little about drupal, thus remidying this has me stumped.

Any help would be grand.

dylunio

libervisco's picture
Offline
Joined: 2006-05-04
It looks like you didn't

It looks like you didn't insert the necessary tables from that module into the database. The install file should have told you that.

Anyway, it should be quite easy to resolve this if you can use phpmyadmin or some other way of querying the database. All you need to do is query the database with the commands (which is the whole content) of the mysql file that should have gotten with the module.

If there is no such file (in which case you're probably using a module for Drupal 4.7) then you have to make sure you're using Drupal 4.7 or if you use the older 4.6 download the 4.6 version of the module.

If the spam module simply failed to install then you'd have to find the queries from the install file and put them in manually...

Btw, there is another module you could consider using, the akismet module. We use that on Nuxified.org and it works great. You would have to register for an account at wordpress.com to get the API number you insert into the configuration area of the module and then it will check the growing (in efficiency) database at akismet.com whenever someone posts a suspicious post. So far this module has unpublished all spam that have gotten to Nuxified.org. Smiling

dylunio's picture
Offline
Joined: 2005-12-20
I have a file named

I have a file named spam.install which came with the tarball (Link to web-viewable spam.install).

It didn't mention it at all in the install, but it must be there for a reason. Do you have any pointers on it?

dylunio

NB: I don't consider Akismet to be Free, since it has different key for comercial and personall use.

libervisco's picture
Offline
Joined: 2006-05-04
Hm it's a bit harder to

Hm it's a bit harder to reliably extract necessary queries from that file, but I think it should work if you're on Drupal 4.7. If you are on earlier Drupal you need the module for that version.

If you would however want to extract queries from that file my guess is you'd just have to query the db with everything that is in db_query function (in between " ").

dylunio wrote:

NB: I don't consider Akismet to be Free, since it has different key for comercial and personall use.

Hm, I'm not sure about that. I'd have to examine the case more closely to come to a definite conclusion. The software itself is Free Software, but to interact with akismet.com and use its database you need the key. This looks like a service that they do have the right to charge for per month if our revenues are higher than $500 (and on Libervis Network they're not at this point). RedHat too gives you the software, but charges a fee for additional services. This seems similar. Since the source is available you can modify the software to not require the API key and work on its own instead, or maybe with your own server.

Still, if I find it offending I will consider the alternative module.

Thanks

dylunio's picture
Offline
Joined: 2005-12-20
I seem to have fixed this by

I seem to have fixed this by adding all the tables and INFO manually, using the data in the spam.install file. I had a bit of trouble since the syntax in the file wasn't accepted by MySQL as valid, so I had to fix it up a bit. Now all seems to work, thanks for the help.

dylunio

libervisco's picture
Offline
Joined: 2006-05-04
Good to hear.

Good to hear. Smiling

Comment viewing options