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?
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?