Arrow

The error "WordPress database error: [Table 'dbname.wp_cas_count' doesn't exist]" | Peter's Custom Anti-Spam for WordPress | Forum

Back to the custom anti-spam plugin page

Please consider registering
guest

Log In

Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
The error "WordPress database error: [Table 'dbname.wp_cas_count' doesn't exist]"
August 28, 2007
12:59 am
Peter
Admin
Forum Posts: 841
Offline

This means that for some reason, the database tables were not created upon activation. This could be because your database user account didn't have CREATE permissions in MySQL. If this is the case, run this MySQL query manually (the easiest way is to paste this into the SQL tab if you have phpMyAdmin).

CREATE TABLE wp_cas_count (
id int(10) NOT NULL AUTO_INCREMENT,
UNIQUE KEY id (id)
);

CREATE TABLE wp_cas_image (
id int(10) NOT NULL,
createtime int(10) NOT NULL,
word VARCHAR(20) NOT NULL,
UNIQUE KEY id (id)
);

September 6, 2007
1:40 pm
CJ
Guest

Still getting errors after table creation.

WordPress database error: [Duplicate entry '0' for key 1]
INSERT INTO wp_cas_image (id, createtime, word) VALUES (0, 1189099780, 'profile')

September 6, 2007
1:43 pm
Peter
Admin
Forum Posts: 841
Offline

Try refreshing a few times. For some reason it didn't increment. Can you provide a link to your site?

September 11, 2007
12:45 am
Peter
Admin
Forum Posts: 841
Offline

Version 2.9.2 fixes the "database not created" problem.

October 11, 2007
3:25 am
JtothaI
Guest

Please excuse my ignorance...I am getting this error and just installed version 2.9.4 of Peter’s Custom Anti-Spam Image Plugin for WordPress

I don't believe I have phpMyAdmin and am trying to find out how to run the query in the standard wordpress interface.

Sorry I am not making sense, I'm ot even sure how I did manage to get my blog up and running!

I activated the plugin, you can give it a try at http://www.getyamindright.com (ironic isn't it?!)

Thanks in advance for any help you can offer, I am swamped in spam (25-50 a day)!

October 11, 2007
12:30 pm
Peter
Admin
Forum Posts: 841
Offline

Hi, create a PHP file with this code (replace the values in the first two statements with the same values you had to enter to WordPress):

< ?php

mysql_connect(yourhostname,yourusername,yourpassword);

mysql_select_db(yourdatabasename) or die ('Unable to select database');

mysql_query("CREATE TABLE cas_count (id int(10) NOT NULL AUTO_INCREMENT, UNIQUE KEY id (id))") or die ('Cannot create count table');

mysql_query("CREATE TABLE cas_image (id int(10) NOT NULL, createtime int(10) NOT NULL, word VARCHAR(20) NOT NULL, UNIQUE KEY id (id))") or die ('Cannot create image table');

print 'Successfully create tables. Try out your installation now!';

?>

October 11, 2007
11:29 pm
JtothaI
Guest

thanks, I'll give that a try! Appreciate the help!

October 11, 2007
11:42 pm
Peter
Admin
Forum Posts: 841
Offline

Oops, your table names didn't need the prefix I added. I've corrected the example.