• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed  Error on Installation

Eric J.

Well-known member
#1
Mysqli prepare error: 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 'fields MEDIUMBLOB NOT NULL, PRIMARY KEY (content_type) ) ENGINE = InnoDB CHAR' at line 4
Zend_Db_Statement_Mysqli->_prepare() in /home/www/pokebasic.com/library/Zend/Db/Statement.php at line 115
Zend_Db_Statement->__construct() in /home/www/pokebasic.com/library/Zend/Db/Adapter/Mysqli.php at line 381
Zend_Db_Adapter_Mysqli->prepare() in /home/www/pokebasic.com/library/Zend/Db/Adapter/Abstract.php at line 467
Zend_Db_Adapter_Abstract->query() in /home/www/pokebasic.com/library/XenForo/Install/Model/Install.php at line 153
XenForo_Install_Model_Install->createApplicationTables() in /home/www/pokebasic.com/library/XenForo/Install/Controller/Install.php at line 200
XenForo_Install_Controller_Install->actionStep2() in /home/www/pokebasic.com/library/XenForo/FrontController.php at line 303
XenForo_FrontController->dispatch() in /home/www/pokebasic.com/library/XenForo/FrontController.php at line 132
XenForo_FrontController->run() in /home/www/pokebasic.com/install/index.php at line 17

Also checked the .js file, it's already correct.
 

Jake Bunce

XenForo moderator
Staff member
#3
That appears to be pulling from:

library/XenForo/Install/Data/MySql.php

Code:
$tables['xf_content_type'] = "
    CREATE TABLE xf_content_type (
        content_type VARCHAR(25) NOT NULL,
        addon_id VARCHAR(25) NOT NULL DEFAULT '',
        fields MEDIUMBLOB NOT NULL,
        PRIMARY KEY (content_type)
    ) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
";
I ran this query manually on my database and it worked fine (no syntax errors).

Try running the query manually on your database using a program like phpmyadmin. In phpmyadmin you would select your database and click the SQL tab, then paste this query:


Code:
    CREATE TABLE xf_content_type (
        content_type VARCHAR(25) NOT NULL,
        addon_id VARCHAR(25) NOT NULL DEFAULT '',
        fields MEDIUMBLOB NOT NULL,
        PRIMARY KEY (content_type)
    ) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci
Does it give a syntax error when you run it?
 

Eric J.

Well-known member
#5
MySQL version is 5.1 I think? I know they have a big sign on their site that says upgrading so I guess I have to wait for that to finish huh? Damn.
 

Eric J.

Well-known member
#7
#1064 - 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 'fields MEDIUMBLOB NOT NULL,
PRIMARY KEY (content_type)
) ENGINE = ' at line 4
Nope. :/


(Also, just checked, apparently my host is in the process of updating the databases to MySQL 5.1)
 

Mike

XenForo developer
Staff member
#8
I can't find any reason for this to be an issue. Apparently in MySQL 4.1, fields was reserved. Though we do require 5.0 (and the installer *should* have checked that).

Can you let me know what happens after trying with 5.1?
 

Eric J.

Well-known member
#9
Alright, well, I contacted customer support on the forums, they don't support MySQLi at all, so could that be the error? And they said it'll be another two weeks before they're finished updating all the databases to 5.1. So yeah, this was nothing but a host problem.
 

Mike

XenForo developer
Staff member
#10
Well, you wouldn't have gotten that far if you didn't have the MySQLi PHP extension, so I'm not sure they know what they're referring to. :)

It does seem like a hosting issue though.