Resolving Pligg Installation Error: The pligg_config table is empty or does not exist

So here I was, trying to setup a Pligg website on my Windows 7 machine. I’ve just gotten the latest MySQL and PHP installed. Setup all the permissions required, and ran the installer.php. All seem to go well until, I got to table setup page..

Step 4:

Creating database tables...
Creating table: 'categories'...
Creating table: 'comments'...
Creating table: 'friends'...
Creating table: 'links'...
Creating table: 'trackbacks'...
Creating table: 'users'...
Creating table: 'tags'...
Creating table: 'votes'...
Creating table: 'config'....
Creating table: 'messages'....
Creating table: 'modules'....
Creating table: 'formulas'....
Creating table: 'Saved Links'....
Creating table: 'Misc Data'....
Creating table: 'groups'....
Creating table: 'group members'....
Creating table: 'group shared'....
Creating table: 'login_attempts'....
Creating table: 'widgets'....
Creating table: 'Totals'....
Creating table: 'Tag cache'....
Inserting default category...
Inserting default modules...
Inserting default widgets...
Inserting default formulas...
Inserting default 'totals' data...
Inserting default 'config' data...
Creating About Page...
Upgrading to UTF-8

Tables were created successfully!
Error. The pligg_config table is empty or does not exist.

Bummer… 😦

Lot of Googling didn’t get me close to a workable solution. So, I took a more drastic measure. Found the installtables.php from the install folder. Copied the firs table creation code…

$sql = "CREATE TABLE `" . table_categories . "` (
`category__auto_id` int(11) NOT NULL auto_increment,
`category_lang` varchar(" . strlen($dblang) . ") NOT NULL default " . "'" . $dblang . "',
`category_id` int(11) NOT NULL default '0',
`category_parent` int(11) NOT NULL default '0',
`category_name` varchar(64) NOT NULL default '',
`category_safe_name` varchar(64) NOT NULL default '',
`rgt` int(11) NOT NULL default '0',
`lft` int(11) NOT NULL default '0',
`category_enabled` int(11) NOT NULL default '1',
`category_order` int(11) NOT NULL default '0',
`category_desc` varchar(255) NOT NULL,
`category_keywords` varchar(255) NOT NULL,
`category_author_level` enum('normal','admin','god') NOT NULL default 'normal',
`category_author_group` varchar(255) NOT NULL default '',
`category_votes` varchar(4) NOT NULL default '',
PRIMARY KEY  (`category__auto_id`),
KEY `category_id` (`category_id`),
KEY `category_parent` (`category_parent`),
KEY `category_safe_name` (`category_safe_name`)
) TYPE = MyISAM;";

Extracted the SQL, replaced the $dblang variable with ‘en’ and ran it in Toad for MySQL. And immediately, it became clear that there’s a syntax error in the SQL. It pointed to TYPE = MyISAM. Hmmm…

Quick lookup on MySQL reference told me this should actually be ENGINE = MyISAM. Whoa! Ran a find-and-replace on installtables.php and re-ran the installation. And would you believe it!? We are in business!

2 thoughts on “Resolving Pligg Installation Error: The pligg_config table is empty or does not exist

  1. Sorry, I'm not the best person provide help on Pligg 🙂
    I tried it out once and moved on..You should try the Pligg forums.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.