Fixed Redirecting a thread error - configuration issue?

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:

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

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

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.
 
Top Bottom