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

XF 1.3 unserialize(): Error at offset 0 of 1 bytes

Hornstar

Well-known member
#1
I did an import from vb 3.8 today, and I am now all live. I have just checked my error log, and I seem to keep getting these errors:
unserialize(): Error at offset 0 of 1 bytes

Code:
Server Error Log
Error Info
ErrorException: unserialize(): Error at offset 0 of 1 bytes - library/XenForo/Model/UserChangeLog.php:45
Generated By: ermanakburu6, Today at 8:17 PM
Stack Trace
#0 [internal function]: XenForo_Application::handlePhpError(8, 'unserialize(): ...', '/home/**/...', 45, Array)
#1 /home/**/public_html/forums/library/XenForo/Model/UserChangeLog.php(45): unserialize('0')
#2 /home/**/public_html/forums/library/XenForo/Model/User.php(2794): XenForo_Model_UserChangeLog->logChanges(827854, Array, NULL)
#3 /home/**/public_html/forums/library/XenForo/DataWriter/User.php(1047): XenForo_Model_User->logChanges(827854, Array)
#4 /home/**/public_html/forums/library/XenForo/DataWriter.php(1409): XenForo_DataWriter_User->_postSave()
#5 /home/**/public_html/forums/library/XenForo/ControllerPublic/Account.php(1004): XenForo_DataWriter->save()
#6 /home/**/public_html/forums/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_Account->actionContactDetailsSave()
#7 /home/**/public_html/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /home/**/public_html/forums/index.php(13): XenForo_FrontController->run()
#9 {main}
Request State
array(3) {
["url"] => string(62) "http://www.gamerzneeds.net/forums/account/contact-details-save"
["_GET"] => array(0) {
}
["_POST"] => array(13) {
["email"] => string(25) "**_**@hotmail.com"
["password"] => string(8) "********"
["receive_admin_email"] => string(1) "1"
["allow_send_personal_conversation_enable"] => string(1) "1"
["allow_send_personal_conversation"] => string(7) "members"
["email_on_conversation"] => string(1) "1"
["custom_fields"] => array(7) {
["aim"] => string(0) ""
["icq"] => string(0) ""
["yahoo"] => string(0) ""
["skype"] => string(0) ""
["gtalk"] => string(0) ""
["facebook"] => string(0) ""
["twitter"] => string(0) ""
}
["custom_fields_shown"] => array(7) {
[0] => string(3) "aim"
[1] => string(3) "icq"
[2] => string(5) "yahoo"
[3] => string(5) "skype"
[4] => string(5) "gtalk"
[5] => string(8) "facebook"
[6] => string(7) "twitter"
}
["_xfToken"] => string(8) "********"
["save"] => string(23) "Değişiklikleri Kaydet"
["_xfRequestUri"] => string(31) "/forums/account/contact-details"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 

Hornstar

Well-known member
#3
All seem similar in nature. Happening to different users when something is saved. Examples of locations that it has reported it happening in:
Code:
http://www.gamerzneeds.net/forums/account/preferences-save
http://www.gamerzneeds.net/forums/account/personal-details-save
http://www.gamerzneeds.net/forums/account/contact-details-save
http://www.gamerzneeds.net/demo/admin.php?users/testuser2006.23040/save
etc.
 

Hornstar

Well-known member
#7
Did you actually use that add-on to do the import?
Did you do it in steps/cumulative imports?
Nah I only used that to import the usergroups and subscriptions, I then used the bigboard importer from Slavik, Jake and Digital Point. to import actual data.
 

Mike

XenForo developer
Staff member
#8
Well, it's possible the big board importer is relevant, but I would need FTP details and access to a user that can reproduce it to do any debugging. When I investigated it before, I didn't see any obvious reason for it to happen.

If you can provide that, please submit a ticket with those details.
 

Jake Bunce

XenForo moderator
Staff member
#9
That error means you didn't rebuild the user cache:

Admin CP -> Tools -> Rebuild Caches -> Rebuild User Caches

The big board importer requires that you rebuild the user cache after the import. That will rebuild the custom_fields cache in the user records which is what that error message is complaining about.
 

Hornstar

Well-known member
#10
That error means you didn't rebuild the user cache:

Admin CP -> Tools -> Rebuild Caches -> Rebuild User Caches

The big board importer requires that you rebuild the user cache after the import. That will rebuild the custom_fields cache in the user records which is what that error message is complaining about.
Maybe it didn't complete as I ran all the caches. I will try again. Thanks.
 

Hornstar

Well-known member
#11
All good. I have not had the error for the past couple of days, so while the user cache was building nearly a million users I was getting it.
 

Hornstar

Well-known member
#12
@Jake I am still getting the error. So I ran the user cache again, and left it overnight. I woke up this morning and it was up to about user 300 000 but not going any further. Almost like it timed out or something. In another tab I opened up the admincp and signed in again, and when I went back to the other tab it said it had finished. However I have roughly 800 000 users to rebuild. I don't have any errors in the error log over night either.

So my question is, if I am having trouble rebuilding nearly a million users, how can I go about this so I can get through them all, so I stop getting these errors?
 

Jake Bunce

XenForo moderator
Staff member
#13
You could maybe edit this file to change the batch size or change what is done by that rebuild:

library/XenForo/Deferred/User.php

Your rebuild is going to take a while with 800k users.
 
#14
I just noticed we are getting a lot of these errors too.

#0 [internal function]: XenForo_Application::handlePhpError(8, 'unserialize(): ...', '/var/www/librar...', 1113, Array)
#1 /var/www/library/XenForo/Model/Post.php(1113): unserialize('Glad to have yo...')
#2 /var/www/library/XenForo/ControllerPublic/Thread.php(93): XenForo_Model_Post->preparePost(Array, Array, Array, Array)
#3 /var/www/library/Andy/SimilarThreads/ControllerPublic/Thread.php(12): XenForo_ControllerPublic_Thread->actionIndex()
#4 /var/www/library/Andy/Calendar/ControllerPublic/Thread.php(12): Andy_SimilarThreads_ControllerPublic_Thread->actionIndex()
#5 /var/www/library/DailyStats/ControllerPublic/Thread.php(7): Andy_Calendar_ControllerPublic_Thread->actionIndex()
#6 /var/www/library/XenForo/FrontController.php(347): DailyStats_ControllerPublic_Thread->actionIndex()
#7 /var/www/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /var/www/index.php(13): XenForo_FrontController->run()
#9 {main}

Request State
array(3) {
["url"] => string(69) "http://jetboaters.net/threads/rattle-trap-fatmat-sound-deadener.1821/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 

Chris D

XenForo developer
Staff member
#18
Could you execute this query on your database, please, and let us know the output?

Code:
SELECT like_users
FROM xf_post
WHERE post_id = 27998
It appears as though you may have some weird data in that field for that post (maybe others).

It's doubtful it's happening at run time (which would suggest an add-on interfering) but I just want to rule that out. Was it an add-on that deleted the user? Or was the user deleted by a member of staff in the Admin CP?

It would appear to be related to likes left by the deleted user.