Many webmasters often face various difficulties and problems when moving their online store opencart to a new domain, or to a new hosting.
How to correctly transfer opencart to a new hosting? - First of all, I recommend using a wonderful Sypex Dumper script for backup of your databases, with it you can quickly backup the entire database, and quickly deploy it on a new hosting and most importantly without losing any data.
Also, always carefully copy all your files, I recommend that you make the archive using the host's own resources, after downloading the already finished archive and unpack it on the new hoster also with the help of its programs.
Well, do not forget to correctly set permissions on files and folders and of course correctly configure config.php configuration files in the root of the site and in the admin folder.
Ok, something I moved away from the topic, the article is not much about that ...
In this article I want to publish a solution to a very common error that appears in webmasters when moving to a new hoster namely:
1 |
Notice: unserialize() [function.unserialize]: Error at offset index.php on line 24 header.php on line 10 index.php on line 42 |
And so if you have this error, then you need to fix it.
The first step is to double-check carefully the config.php files
If it does not help to clean the cache /system/cache/, by the way it is better to clean it immediately, and also to clear the vqmod cache vqmod/vqcache.
Did not help? We execute the following query to the database:
1 2 3 |
deleteΒ FROM `oc_setting`Β where groupe='welcome' |
Naturally, in the request, change the prefix oc_ to your own which you have installed.
If this did not help then you need to look more globally, namely open the file admin/index.php
And change (TEMPORARILY):
1 |
$config->set($setting['key'], unserialize($setting['value'])); |
To the following:
1 |
$config->set($setting['key'], unserialize($setting['value'])); if (!unserialize($setting['value'])) echo $setting['key']."==>".$setting['value']."<hr>"; |
Thus, the exact table in which there is an error falls on the screen. By the way, I always do this method first of all if there is such an error.
After we identify who is guilty, we try to fix it in the data table, that's basically all, so we can fix the Notice: unserialize() error, and do not forget to return admin/index.php
Good luck, I hope the note will be useful to someone.
No Comment
You can post first response comment.