1. 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

Discussion in 'Installation, Upgrade, and Import Support' started by Hornstar, Apr 27, 2014.

  1. Hornstar

    Hornstar Well-Known Member

    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

    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"
  2. Chris D

    Chris D XenForo Developer Staff Member

    It reminds me of this which @Mike never got a response to:


    Are all of the errors the same? This specifically appears to be happening when a user saves the Contact Detals page.

    I can't see anything wrong according to the stack trace and post parameters.

    Is there others that might be happening to different users on different pages?
  3. Hornstar

    Hornstar Well-Known Member

    All seem similar in nature. Happening to different users when something is saved. Examples of locations that it has reported it happening in:
  4. Chris D

    Chris D XenForo Developer Staff Member

    Just to eliminate it, are there any add-ons at all yet? If so what are they?
  5. Hornstar

    Hornstar Well-Known Member

    However I think when it first happened, I only had the import tools one installed.
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Did you actually use that add-on to do the import?
    Did you do it in steps/cumulative imports?
  7. Hornstar

    Hornstar Well-Known Member

    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.
  8. Mike

    Mike XenForo Developer Staff Member

    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.
  9. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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 and Mike like this.
  10. Hornstar

    Hornstar Well-Known Member

    Maybe it didn't complete as I ran all the caches. I will try again. Thanks.
  11. Hornstar

    Hornstar Well-Known Member

    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.
  12. Hornstar

    Hornstar Well-Known Member

    @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?
  13. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You could maybe edit this file to change the batch size or change what is done by that rebuild:


    Your rebuild is going to take a while with 800k users.
  14. mitchelled

    mitchelled Member

    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) {
  15. Chris D

    Chris D XenForo Developer Staff Member

  16. mitchelled

    mitchelled Member

  17. mitchelled

    mitchelled Member

    Looks like both threads have a similarity with a de-activated user....need to look into how that was accomplished - could be our issue...
  18. Chris D

    Chris D XenForo Developer Staff Member

    Could you execute this query on your database, please, and let us know the output?

    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.
  19. mitchelled

    mitchelled Member

    Yup...it is related to the likes left by the deleted user....we'll hunt that down and clean it up. Thanks!

Share This Page