after moving opencart to another domain
when logging into the admin panel
Notice: unserialize() [function.unserialize]: Error at offset 50 of 54 bytes in /home/....../admin/index.php on line 45
Fatal error: Call to a member function getId() on a non-object in /home/....../catalog/controller/common/header.php on line 43
when visiting the site
Notice: unserialize() [function.unserialize]: Error at offset 50 of 54 bytes in /home/..../index.php on line 61
check the configuration in the files
admin/config.php
and /config.php
clear the cache
/system/cache/
check the encoding of the image file names
run the query
delete
FROM `myprefix_setting`
where groupe='welcome'
make changes
in admin/index.php
replace on line 45
$config->set($setting['key'], unserialize($setting['value']));
with this
$config->set($setting['key'], unserialize($setting['value'])); if (!unserialize($setting['value'])) echo $setting['key']."==>".$setting['value']."
";
and you'll see what exactly is missing
indeed, the data in the serialized array was corrupted
after importing the database via phpmyadmin
in the table
myprefix_setting
testimonial
testimonial_module
a:1:{i:1;a:8:{s:17:"testimonial_title";a:1:{i:2;s:12:"Отзывы";}s:17:"testimonial_limit";s:2:"10";s:18:"testimonial_random";s:1:"0";s:27:"testimonial_character_limit";s:3:"100";s:9:"layout_id";s:1:"9";s:8:"position";s:14:"content_bottom";s:6:"status";s:1:"0";s:10:"sort_order";s:0:"";}}
restored it manually and everything worked
Comments