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

Fixed Error on Installation

Discussion in 'Resolved Bug Reports' started by Eric J., Oct 5, 2010.

  1. Eric J.

    Eric J. Well-Known Member

    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.
     
  2. Eric J.

    Eric J. Well-Known Member

    Help? :(
     
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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?
     
  4. Mike

    Mike XenForo Developer Staff Member

    Do you know your MySQL version as well? Maybe it's a reserved word?
     
  5. Eric J.

    Eric J. Well-Known Member

    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.
     
  6. Mike

    Mike XenForo Developer Staff Member

    Can you run the query manually?
     
  7. Eric J.

    Eric J. Well-Known Member

    Nope. :/


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

    Mike XenForo Developer Staff Member

    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?
     
  9. Eric J.

    Eric J. Well-Known Member

    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.
     
  10. Mike

    Mike XenForo Developer Staff Member

    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.
     

Share This Page