XF 1.1 Migration Issue

fattony69

Well-known member
I just transferred my forum to a new server. Now I get the error: An unexpected error occurred. Please try again later.
 
Have you checked your server logs to see if there's anything specific in there?

Can you login to your XF Admin Control Panel? If so, is there anything in the XF error logs that helps?
 
For that error message you might get a more detailed error by enabling debug mode in the library/config.php file:

Code:
$config['debug'] = 1;
The issue I get is: An exception occurred: unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 0 of 1 bytes in /public_html/community/library/XenForo/Model/DataRegistry.php on line 117
  1. XenForo_Application::handlePhpError()
  2. unserialize() in XenForo/Model/DataRegistry.php at line 117
  3. XenForo_Model_DataRegistry->getMulti() in XenForo/Dependencies/Abstract.php at line 134
  4. XenForo_Dependencies_Abstract->preLoadData() in XenForo/FrontController.php at line 125
  5. XenForo_FrontController->run() in public_html/community/index.php at line 13
 
The issue I get is: An exception occurred: unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 0 of 1 bytes in /public_html/community/library/XenForo/Model/DataRegistry.php on line 117
  1. XenForo_Application::handlePhpError()
  2. unserialize() in XenForo/Model/DataRegistry.php at line 117
  3. XenForo_Model_DataRegistry->getMulti() in XenForo/Dependencies/Abstract.php at line 134
  4. XenForo_Dependencies_Abstract->preLoadData() in XenForo/FrontController.php at line 125
  5. XenForo_FrontController->run() in public_html/community/index.php at line 13

Ugh... that error.

Basically your MySQL connector has an apparent problem that is corrupting data when it's written to the database. Upgrade your MySQL client library in PHP to fix it (contact your host or server person). The theory is that the mysql extensions in your PHP installation are buggy. I don't have a specific version to recommend... just the latest stable version.

There is not a specific bug that I have identified here. It's just process of elimination. I debugged this problem for another customer once (as did Mike). I verified that the data is correct in XenForo up to the point when the query is handed to MySQL. Then for some reason the query doesn't write the correct information.

Also, it's important to realize that the nature of the unserialize() error you posted is that the information in the database is corrupt (corrupted by this alleged bug in mysql). So the error will still exist on your forum even after the mysql problem is fixed. You could restore a backup from before the error started, or it should be safe to run this query to clear the registry:

Code:
TRUNCATE TABLE xf_data_registry;

All of the registry entries should be automatically rebuilt on the next page load. And if the bug is fixed at that point then the data should be written correctly which will fix the error. But please backup before doing this.

For reference:
http://xenforo.com/community/threads/upgrading-server.30960/
 
Ugh... that error.

Basically your MySQL connector has an apparent problem that is corrupting data when it's written to the database. Upgrade your MySQL client library in PHP to fix it (contact your host or server person). The theory is that the mysql extensions in your PHP installation are buggy. I don't have a specific version to recommend... just the latest stable version.

There is not a specific bug that I have identified here. It's just process of elimination. I debugged this problem for another customer once (as did Mike). I verified that the data is correct in XenForo up to the point when the query is handed to MySQL. Then for some reason the query doesn't write the correct information.

Also, it's important to realize that the nature of the unserialize() error you posted is that the information in the database is corrupt (corrupted by this alleged bug in mysql). So the error will still exist on your forum even after the mysql problem is fixed. You could restore a backup from before the error started, or it should be safe to run this query to clear the registry:

Code:
TRUNCATE TABLE xf_data_registry;

All of the registry entries should be automatically rebuilt on the next page load. And if the bug is fixed at that point then the data should be written correctly which will fix the error. But please backup before doing this.

For reference:
http://xenforo.com/community/threads/upgrading-server.30960/
I had my host do this as this was in unfamiliar territory for me. They said the update seemed to work and I agree.
 
Top Bottom