I tried installing a new blog with Alex King’s Popularity Contest Plugin. The new blog is still under construction, therefore I could not expose the domain yet. Unfortunately, when I was about to activate the plugin, it shows “Plugin Cannot Be Activated Due To Fatal Error”. I tried my previous method of manually creating the table for this plugin, but it does not work anymore.

Fortunately, I found the solution. It is still a little hard to look for the solution because it is quite a long post. I think this should do the tric:-

Open pupularity-contest.php

Goto Line 59

Replace require('../../wp-blog-header.php'); with require('../wp-blog-header.php')

Also you will need to do the following if the top alone does not work. This step is to create the tables needed for the plugin.

CREATE TABLE `wp_ak_404_log` (
`id` int(11) NOT NULL auto_increment,
`url_404` text NOT NULL,
`url_refer` text,
`user_agent` text,
`date_gmt` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=100 ;

CREATE TABLE `wp_ak_popularity` (
`post_id` int(11) NOT NULL default ‘0′,
`total` int(11) NOT NULL default ‘0′,
`feed_views` int(11) NOT NULL default ‘0′,
`home_views` int(11) NOT NULL default ‘0′,
`archive_views` int(11) NOT NULL default ‘0′,
`category_views` int(11) NOT NULL default ‘0′,
`single_views` int(11) NOT NULL default ‘0′,
`comments` int(11) NOT NULL default ‘0′,
`pingbacks` int(11) NOT NULL default ‘0′,
`trackbacks` int(11) NOT NULL default ‘0′,
`last_modified` datetime NOT NULL default ‘0000-00-00 00:00:00′,
KEY `post_id` (`post_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

CREATE TABLE `wp_ak_popularity_options` (
`option_name` varchar(50) NOT NULL,
`option_value` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

NOTE that the three tables created wp_ak_404_log, wp_ak_popularity and wp_ak_popularity_options have to be changed to the correct prefix. Default prefix is wp_

Have Fun!

If you enjoyed this post, make sure subscribe to my RSS feed! or your could read this blog via Email Subscription.