Answers.Body: <p>This line reads the data from the table <code>civicrm_setting</code> and specifically the column <code>value</code>.  You could use a SQL client to run the query:</p>
  
  <pre><code>SELECT id, name, value FROM civicrm_setting;
  </code></pre>
  
  <p>Typical values would look these:</p>
  
  <ul>
  <li><code>NULL</code></li>
  <li><code>i:0;</code> (an integer)</li>
  <li><code>b:1;</code> (a boolean?)</li>
  <li><code>s:20:"CRM/common/fatal.tpl";</code> (a string)</li>
  <li><code>a:1:{s:3:"key";s:5:"value";}</code> (an array or dictionary)</li>
  </ul>
  
  <p>Skim them and see if one of the values looks to have a different/unexpected format.</p>
  
  <hr>
  
  <p>(UPDATE) Seamus Lee pointed me to <a href="https://www.drupal.org/node/1114304" rel="nofollow noreferrer">https://www.drupal.org/node/1114304</a> which uses a clever technique for finding badly serialized data. Take the error message (<code>Error at offset 0 of 8 bytes</code>) and note the length (8 bytes). Search on that:</p>
  
  <pre><code>SELECT id, name, value FROM civicrm_setting WHERE length(value) = 8;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-18T00:16:04.010Z
Answers.Text: 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:
Answers.UserDisplayName: Rod W
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-18T00:24:39.437Z
Answers.Text: 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";
Answers.UserDisplayName: Rod W
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-18T00:25:12.037Z
Answers.Text: 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";
Answers.UserDisplayName: Rod W
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-18T00:25:19.957Z
Answers.Text: 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";
Answers.UserDisplayName: Rod W
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-18T00:27:13.363Z
Answers.Text: 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.
Answers.UserDisplayName: Rod W
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-19T00:02:40.520Z
Answers.Text: Yeah, I find that frustrating too. For longer technical, it may be easier to put the data on a site like https://gist.github.com/ or http://paste2.org/ or http://pastebin.com/ -- then just link it.
Answers.UserDisplayName: Tim Otten
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-08T02:48:34.143Z
Answers.LastActivityDate: 2016-12-09T22:16:09.587Z
Answers.LastEditDate: 2016-12-09T22:16:09.587Z
Answers.UserDisplayName: Tim Otten
Body: <p>Thank you all for your continued patience with me.</p>
  
  <p>Since the past two updates, I keep getting the following error:</p>
  
  <p>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).</p>
  
  <p>I know this is related to a mySQL database problem, but for the life of me I cannot figure this out.</p>
  
  <p>I am running CiviCRM 4.7.14 on Drupal 7.52</p>
  
  <p>Thank you again</p>
  
Tags: <drupal><error><mysql>
Title: Need help solving unserialize():Error at offset
ThreadText: # Need help solving unserialize():Error at offset
  
  (Asked by: username_0 on 2016-12-07)
  
  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
  
  **Tags:** drupal, error, mysql
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-12-08. Score: 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;
  
  ```
  
  > **Comments:**
  > **username_0**: 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:  
  > **username_0**: 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";  
  > **username_0**: 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";  
  > **username_0**: 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";  
  > **username_0**: 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.  
  > **username_1**: Yeah, I find that frustrating too. For longer technical, it may be easier to put the data on a site like https://gist.github.com/ or http://paste2.org/ or http://pastebin.com/ -- then just link it.  
  
  ---
  
  