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

Fixed Redirecting a thread error - configuration issue?

Discussion in 'Resolved Bug Reports' started by Martok, Jan 19, 2014.

  1. Martok

    Martok Well-Known Member

    If I try to redirect a thread and then set the redirection expiry to something large like 9999 months or weeks, I get the following error:

    Server Error
    Mysqli statement execute error : Out of range value for column 'expiry_date' at row 1
    Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
    Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
    Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 574
    Zend_Db_Adapter_Abstract->insert() in XenForo/Model/ThreadRedirect.php at line 136
    XenForo_Model_ThreadRedirect->insertThreadRedirect() in XenForo/Model/ThreadRedirect.php at line 112
    XenForo_Model_ThreadRedirect->createRedirectThread() in XenForo/ControllerPublic/Thread.php at line 1252
    XenForo_ControllerPublic_Thread->actionMove() in XenForo/FrontController.php at line 347
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    XenForo_FrontController->run() in /var/www/vhosts/snrdev.seniorgamers.net/httpdocs/index.php at line 13
    It appears that the date it doesn't like going past is Sun, 07 Feb 2106 06:28:16 GMT which, in unix time, is 4294967296. Why this number? This is 16^8.

    @Brogan isn't getting this error, so presumably it is some configuration or MySQL issue.

    Any idea what the configuration/MySQL issue might be and how to correct it? Also, is there something that can be changed in Xenforo itself to prevent getting an error or allowing for long redirection settings like this?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    What is the field type for xf_thread_redirect.expiry_date ?

    It should be int(10).
  3. Martok

    Martok Well-Known Member

    Yep, it's int(10)
  4. Brogan

    Brogan XenForo Moderator Staff Member

  5. Martok

    Martok Well-Known Member

    I'm running MySQL version 5.5.30 (reading this from phpMyAdmin it says "Software version: 5.5.30 - MySQL Community Server 5.5 (GPL)"
    I'm also on PHP Version 5.3.17

    I've just looked at phpinfo() and I noticed that under mysql it says "Client API version 5.0.77" Is this something different?
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    4.2 billion is the limit of an unsigned 32 bit integer. That's why.

    Strictly speaking, this is a bug. XenForo should enforce a range on that field. Moving to bug reports.
    Martok likes this.
  7. Mike

    Mike XenForo Developer Staff Member

    I've capped this when inserting it now.
    Martok likes this.

Share This Page