Answers.Body: <p>Adding a "^" to the craftcms version in the <code>composer.json</code> file and then running <code>composer update</code>, did the trick for me.</p>
  
  <p>for example: <code>"craftcms/cms": "^3.1.22",</code></p>
  
  <p>I also cleared the cache folder in <code>/storage/runtime/cache</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-11T05:13:07.317Z
Answers.Text: Yep - this fixed it for me also
Answers.UserDisplayName: JKM
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-14T08:21:05.857Z
Answers.LastActivityDate: 2019-08-14T08:21:05.857Z
Answers.UserDisplayName: José Veríssimo
Answers.Body: <p>I had this issue after I deployed to an environment I hadn't used for a while. I deployed the files and updated the database, but I forgot to update the Composer files. So the site was trying to use the outdated Composer files that were on the server, resulting in errors.</p>
  
  <p>So I ran <code>rm -R vendor</code> and <code>composer install</code> and was back on track.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-09-23T20:38:41.320Z
Answers.LastActivityDate: 2019-09-23T20:38:41.320Z
Answers.UserDisplayName: kmgdev
Answers.Body: <p>It looks like the issue here was that the craft version running on staging was and old one (14 days old). The data held in info config was stored as serialized data at that time. When I supplied un updated dump of the db, the same value of info config was stored as json, but the outdated craft was trying to unserialize it. It was fixed by making sure the staging version of craft was up to date. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-12T19:42:17.603Z
Answers.LastActivityDate: 2019-07-12T19:42:17.603Z
Answers.UserDisplayName: Lara Hilal
Body: <p>Hey guys I am getting this error:
  unserialize(): Error at offset 0 of 60695 bytes
  when i push a backup of my local db to my staging environment. 
  I am using craft 3.
  Any ideas? Clearing the /storage/runtime/cache didn't work.</p>
  
  <p>More info here:
  The value that php is trying to unserialize() and failing to do so looks like json (The value of info config, see picture below). 
  Looking at an old version of a db dump, that value looks like it was proper serialized data. 
  At some point, craft started storing it as json? </p>
  
  <p><a href="https://i.sstatic.net/z0BOl.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/z0BOl.png" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-07-10T19:06:34.640Z
Comments.Text: Also had the exact same problem yesterday. Only fix we could find was to empty the /vendor folder and run `composer install` again locally
Comments.UserDisplayName: James Greig
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-07-11T12:05:54.503Z
Comments.Text: I can confirm there's been some changes about the way configuration data is serialized. We've got some issues about that too. See https://github.com/craftcms/cms/issues/4459
Comments.UserDisplayName: Alban Jubert
Tags: <craft3><error>
Title: unserialize(): Error at offset 0 of 60695 bytes
ThreadText: # unserialize(): Error at offset 0 of 60695 bytes
  
  (Asked by: username_0 on 2019-07-10)
  
  Hey guys I am getting this error:
  unserialize(): Error at offset 0 of 60695 bytes
  when i push a backup of my local db to my staging environment.
  I am using craft 3.
  Any ideas? Clearing the /storage/runtime/cache didn't work.
  
  More info here:
  The value that php is trying to unserialize() and failing to do so looks like json (The value of info config, see picture below).
  Looking at an old version of a db dump, that value looks like it was proper serialized data.
  At some point, craft started storing it as json?
  
  [![enter image description here](https://i.sstatic.net/z0BOl.png)](https://i.sstatic.net/z0BOl.png)
  
  **Tags:** craft3, error
  
  > **Comments:**
  > **username_1**: Also had the exact same problem yesterday. Only fix we could find was to empty the /vendor folder and run `composer install` again locally  
  > **username_2**: I can confirm there's been some changes about the way configuration data is serialized. We've got some issues about that too. See https://github.com/craftcms/cms/issues/4459  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_3 on 2019-08-14. Score: 8
  
  Adding a "^" to the craftcms version in the `composer.json` file and then running `composer update`, did the trick for me.
  
  for example: `"craftcms/cms": "^3.1.22",`
  
  I also cleared the cache folder in `/storage/runtime/cache`
  
  > **Comments:**
  > **username_4**: Yep - this fixed it for me also  
  
  ---
  
  ### Answer by username_5 on 2019-09-23. Score: 2
  
  I had this issue after I deployed to an environment I hadn't used for a while. I deployed the files and updated the database, but I forgot to update the Composer files. So the site was trying to use the outdated Composer files that were on the server, resulting in errors.
  
  So I ran `rm -R vendor` and `composer install` and was back on track.
  
  
  ---
  
  ### Answer by username_0 on 2019-07-12. Score: 1
  
  It looks like the issue here was that the craft version running on staging was and old one (14 days old). The data held in info config was stored as serialized data at that time. When I supplied un updated dump of the db, the same value of info config was stored as json, but the outdated craft was trying to unserialize it. It was fixed by making sure the staging version of craft was up to date.
  
  
  ---
  
  