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

DB problem

Discussion in 'Troubleshooting and Problems' started by Tracy Perry, Mar 23, 2013.

  1. Tracy Perry

    Tracy Perry Well-Known Member

    I'm getting the following error on my site
    An unexpected database error occurred. Please try again later.

    I've checked all logs and cannot find anything out of the ordinary. The only thing I did was install mod-security (and then removed it via apt-get remove after I was getting errors). Now the site cannot be connected to at all.

    I've also restarted the VPS just to check that and disabled all add ons.

    I've checked all the config files for modification dates for Apache, php5 and mysql but none are recent. Any suggestions where to look since xenForo apparently doesn't write an error file that you can use.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Enable debug mode.

    Right click on the page and select "View page source".

    Does that show any more information?
    Chris D likes this.
  3. Tracy Perry

    Tracy Perry Well-Known Member

    An exception occurred: Mysqli prepare error: Unknown table engine 'InnoDB' in /var/www/twowheel/library/Zend/Db/Statement/Mysqli.php on line 77
    1. Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
    2. Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
    3. Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
    4. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 825
    5. Zend_Db_Adapter_Abstract->fetchOne() in XenForo/Error.php at line 50
    6. XenForo_Error::unexpectedException() in XenForo/Application.php at line 295
    7. XenForo_Application::handleException()
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Unknown table engine 'InnoDB'

    Some of the tables are InnoDB so that is required.
  5. Tracy Perry

    Tracy Perry Well-Known Member

    Yep, but the strange thing is I haven't done anything to mysql... it was working 30 minutes prior.. will check the my.cnf.
  6. Tracy Perry

    Tracy Perry Well-Known Member

    For some reason the engine is no longer enabled... now to figure out how to reenable it on Debian.
  7. Tracy Perry

    Tracy Perry Well-Known Member

    It's enabled - getting an error in syslog showing that it can't write to tmp/xxxx. Oh well, if I remove mysql, I guess the databases cannot be used again?

    And now fixed. Permissions on /tmp were changed for some reason (may need to check a cron job I have set up to extract files to there).
    chown root:root /tmp
    chmod 1777 /tmp
    /etc/init.d/mysql restart

    fixed the problem.
  8. Brogan

    Brogan XenForo Moderator Staff Member

    Empty the tmp/ directory and/or check the write permissions.
    Chris D likes this.
  9. Tracy Perry

    Tracy Perry Well-Known Member

    It was a permission problem... chmod 1777 to /tmp for root:root did it.
    Only thing I can guess is something with mod-security did it as the only chmod that is performed by my script is to an exact filename in a folder created in the /tmp directory.

Share This Page