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

XF 1.5 Fresh Install - Server Error on Step 2b

Getting the following error on fresh install with new MySQL 5.5 DB:

Server Error
Mysqli statement execute error : Data too long for column 'unique_key' at row 1

  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in XenForo/Model/Deferred.php at line 139
  4. XenForo_Model_Deferred->defer() in XenForo/Application.php at line 1458
  5. XenForo_Application::defer() in XenForo/Install/Model/Install.php at line 420
  6. XenForo_Install_Model_Install->insertDeferredRebuild() in XenForo/Install/Controller/Install.php at line 237
  7. XenForo_Install_Controller_Install->actionStep2b() in XenForo/FrontController.php at line 351
  8. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  9. XenForo_FrontController->run() in ...(path removed)/install/index.php at line 18

Chris D

XenForo developer
Staff member
I can't see why this would happen.

As far as I can see the unique_key for this particular step would be "installUpgradeRebuild" which is shorter than the 50 characters that are allowed in that field. I assume this happens repeatedly if you try again?

If you run the following query on your database, what's the result?
Second attempt produced the same error, I tried that before posting. Here is the output from that query:


Create Table
CREATE TABLE `xf_deferred` (
`deferred_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`unique_key` varbinary(50) DEFAULT NULL,
`execute_class` varchar(75) NOT NULL,
`execute_data` mediumblob NOT NULL,
`manual_execute` tinyint(4) NOT NULL,
`trigger_date` int(11) NOT NULL,
PRIMARY KEY (`deferred_id`),
UNIQUE KEY `unique_key` (`unique_key`),
KEY `trigger_date` (`trigger_date`),
KEY `manual_execute_date` (`manual_execute`,`trigger_date`)
What exactly is being written to that tuple attribute? Anything involving a path/directory? Just trying to see what would surpass 50 characters.

Chris D

XenForo developer
Staff member
Looking at the stack trace, this is what is ultimately triggering that query:
XenForo_Application::defer('Atomic', array('simple' => $rebuilds), 'installUpgradeRebuild', true, null, true);
The bit entered into the unique_key field in this case is literally the string 'installUpgradeRebuild'. Clearly that doesn't exceed 50 characters so that is confusing.

It may be worth seeing if you can get hold of any MySQL error logs to see if there is anything else being logged aside from this.

It might also be worth looking at some various MySQL limits - one of which would be the "max_allowed_packet" value. It may be worth checking it isn't ridiculously low.
Can't access logs, hosting company (1and1) says they don't offer that for shared hosting. For the limit, I doubt I'd be able to change it if it wasn't adequate (shared host), but what is the recommended value for max allowed packet? I've never had any issues installing other software before (wordpress, drupal, phpbb, vbulletin, etc), so I doubt this is the issue.

Chris D

XenForo developer
Staff member
1and1 hmm...

We saw some problems recently with a change they made. If you log into your hosting panel is there a section somewhere for PHP Settings? If so, which version is set? If no version is set, does changing the version help? That said, if this was the problem you likely wouldn't be able to begin the install but to rule out any issues with this it may be worth trying a different version.

Chris D

XenForo developer
Staff member
Knowing the code involved here, I am currently unsurprised to hear the host is having issues. The error is presenting itself in such a way that suggests there's something more sinister at play outside of the code so, hopefully, it will be back up soon and just work.
Makes sense. As a fellow developer, I can see why that particular code execution shouldn't throw that message. I'll let you know once they answer the call. 30+ minutes waiting for tech support now, must be a global issue.
The problem was the PHP 5.6 not being specified on the domain in 1and1. I have 30+ domains on that host and every one has been automatically assigned the recommended version before, not sure why this one wasn't. Either way, good to know for the future. The reason everything was down for me turns out to be that they blacklisted my IP after trying to access the new SFTP account I created for XenForo support (ticket system), 10 minutes after creating it. It evidently wasn't fully set up yet so they blacklisted me for failed authorization. Waited in their support queue for 1.5 hours to hear that. Needless to say, I'll be switching my business of 8+ years with them elsewhere. Any recommendations? Hah.

Chris D

XenForo developer
Staff member
We can't recommend specific hosts officially. There are some hosts who specialise in XF hosting however and I would guess most of those would have some sort of write up by members here.

Glad it got sorted.