PDA

View Full Version : Unable to create system_plugins table


chris.morgan
10-29-2006, 02:29 AM
Having installed soholaunch locally on an Apache2.2/PHP5.2 WinXP box - having had to hack the install script a bit, the file_download class was acting strangely - and trying to view the plugin manager (for the first time), I was confronted with, behind the "Plugin Manager" box, some text. On inspecting the text, I found it said,

Unable to create system_plugins table!
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'VACHAR(50))' at line 1

I'm not sure whether this is a real problem, though. I haven't got any plugins to test it with yet! :P
Opening this spot again, it still won't do it.
On doing a "select * from soholaunch.system_plugins", I found that it definately wasn't there.
Has anyone else had this problem?

I found the file (ain't grep great!), sohoadmin/program/webmaster/plugin_manager/dbtable_check-plugins.php, and found the bit it was choking on:

if ( !table_exists("system_plugins") ) {
$wDeez = "PRIKEY INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT";
$wDeez .= ", PLUGIN_FOLDER VARCHAR(255)"; // Ties to same field in hook table
$wDeez .= ", TITLE VARCHAR(255)";
$wDeez .= ", VERSION VARCHAR(255)"; // For auto-update

$wDeez .= ", DESCRIPTION VARCHAR(255)";
$wDeez .= ", AUTHOR VARCHAR(255)";
$wDeez .= ", HOMEPAGE VARCHAR(255)";
$wDeez .= ", ICON VARCHAR(255)";
$wDeez .= ", OPTIONS_LINK VARCHAR(255)";
$wDeez .= ", MISC BLOB";
$wDeez .= ", LAST_UPDATED VARCHAR(30)";
$wDeez .= ", changelog BLOB";
$wDeez .= ", release_date VACHAR(50)";

$create_qry = "CREATE TABLE system_plugins (".$wDeez.")";
if ( !mysql_db_query($db_name, $create_qry) ) { echo "Unable to create system_plugins table!<br>".mysql_error(); }
}

So, what it is failing to do is:

CREATE TABLE system_plugins (PRIKEY INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT, PLUGIN_FOLDER VARCHAR(255), TITLE VARCHAR(255), VERSION VARCHAR(255), DESCRIPTION VARCHAR(255), AUTHOR VARCHAR(255), HOMEPAGE VARCHAR(255), ICON VARCHAR(255), OPTIONS_LINK VARCHAR(255), MISC BLOB, LAST_UPDATED VARCHAR(30), changelog BLOB, release_date VACHAR(50))

through mysql.exe, I tried various things, and finally came to the conclusion that it is indeed the column release_date which is creating trouble: it works fine without that column. Now the really wierd bit: if I only do that column, it works. It seems to be that I can only have 9 varchar columns in a table! But then, if I do an "ALTER TABLE ... ADD COLUMN ...", it works! Is something screwy on my system?

Mike Morrison
10-30-2006, 04:21 PM
Wow. If everybody could investigate problems that far on their own my job would be a lot easier. :cool:

I've seen that error a couple of times myself and have been wondering about it. Usually when I see it I just go to Help Center > Diagnostic > "Re-apply latest version compatibility" and that fixes it.

No clue why it won't create that release_date field in the initial create query. Random tought: could it have anything to do with the word "date"? I've seen stranger things happen with mysql.

Irene Bushnell
05-28-2007, 04:31 PM
I have this same error message "Table 'system_plugins' already exists. I just downloaded the latest version and am trying to login to Sohoadmin but just get this message. I am not as sophisticated as chris.morgan! You indicated you go to Help Center > Diagnostic to re-apply the latest version. How do I get to the Help Center? I seem to be stuck on a blank window with just the error message.

Thanks.

Mike Morrison
05-29-2007, 12:26 PM
If you have cPanel access you might be able to log-in to cPanel, click the MySQL icon, go into phpMyAdmin and drop the system_plugins table. Try that.

Irene Bushnell
06-04-2007, 10:07 PM
Thank you so much for the reply. I did drop the table you mentioned, then it gave me the same message on the table System Hook Attachments so I dropped that one also and now I can log in. I really appreciate your help - this is way beyond me...but I am learning!