3

Thank you all for your continued patience with me.

Since the past two updates, I keep getting the following error:

Notice: unserialize(): Error at offset 0 of 8 bytes in Civi\Core\SettingsBag->loadValues() (line 153 of /home/[usrpath]/public_html/[sitedirectory]/sites/all/modules/civicrm/Civi/Core/SettingsBag.php).

I know this is related to a mySQL database problem, but for the life of me I cannot figure this out.

I am running CiviCRM 4.7.14 on Drupal 7.52

Thank you again

5

This line reads the data from the table civicrm_setting and specifically the column value. You could use a SQL client to run the query:

SELECT id, name, value FROM civicrm_setting;

Typical values would look these:

  • NULL
  • i:0; (an integer)
  • b:1; (a boolean?)
  • s:20:"CRM/common/fatal.tpl"; (a string)
  • a:1:{s:3:"key";s:5:"value";} (an array or dictionary)

Skim them and see if one of the values looks to have a different/unexpected format.


(UPDATE) Seamus Lee pointed me to https://www.drupal.org/node/1114304 which uses a clever technique for finding badly serialized data. Take the error message (Error at offset 0 of 8 bytes) and note the length (8 bytes). Search on that:

SELECT id, name, value FROM civicrm_setting WHERE length(value) = 8;
  • All but 3 entries are in the format of s:1:"3"; where the number in quotes varies. There are 2 entries where instead of a number in quotes there is a comma, and one where there is a period/dot. Other than that they are all the same: – Rod W Dec 18 '16 at 0:16
  • id name value 17 max_attachments s:1:"3"; 18 contact_undelete s:1:"1"; 19 empoweredBy s:1:"0"; 20 logging s:1:"1"; 21 maxFileSize s:1:"3"; 22 doNotAttachPDFReceipt s:1:"1"; 23 secondDegRelPermissions s:1:"0"; 24 checksum_timeout s:1:"7"; 31 dedupe_default_limit s:1:"0"; 32 remote_profile_submissions s:1:"0"; – Rod W Dec 18 '16 at 0:24
  • 40 fieldSeparator s:1:","; <---- comma 41 inheritLocale s:1:"0"; 44 monetaryThousandSeparator s:1:","; <---- comma 45 monetaryDecimalPoint s:1:"."; <---- period/dot 58 contact_smart_group_display s:1:"1"; 72 hideCountryMailingLabels s:1:"1"; 83 enable_innodb_fts s:1:"0"; 84 includeWildCardInName s:1:"1"; – Rod W Dec 18 '16 at 0:25
  • 85 includeEmailInName s:1:"1"; 86 includeNickNameInName s:1:"0"; 87 includeAlphabeticalPager s:1:"1"; 88 includeOrderByClause s:1:"1"; 89 smartGroupCacheTimeout s:1:"5"; – Rod W Dec 18 '16 at 0:25
  • This editor makes me crazy. Pressing enter (when trying to add a new line adds the comment and I don't have permissions to edit my own comments! Also, The comments do not seem to honor a carriage return so the list is not at all helpful. Not sure how to set this up so people can actually make sense of the return results. – Rod W Dec 18 '16 at 0:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.