I upgraded to opencart 2.03.1. I am getting unserialized() error at offset 0 to t in index.php. I found the line of code. It is the following:
foreach ($query->rows as $setting) {
if (!$setting['serialized']) {
$config->set($setting['key'], $setting['value']);
} else {
$config->set($setting['key'], unserialize($setting['value'])); <=== error is on this line
So I changed that line to this to see the output: $config->set($setting['key'], unserialize($setting['value'])); if (!unserialize($setting['value'])) echo $setting['key']."==>".$setting['value']."<hr>";
I get these 2 errors:
Notice: unserialize(): Error at offset 0 of 5 bytes in C:\xampp\htdocs\store\admin\index.php on line 39
config_complete_status==>["5"]
Notice: unserialize(): Error at offset 0 of 5 bytes in C:\xampp\htdocs\store\admin\index.php on line 39
config_processing_status==>["2"]
I started with a fresh database so these are values put in by the install. Does those errors mean that the value should be serialized or no?
I have attached what those entries look like in the database.
That's not serialized data it looks more like JSON encoded. JSON is used in later versions of OpenCart. It looks like you have got something mixed up somewhere.
What versions are you upgrading from and to?
What versions are you upgrading from and to?
The current version is 1.4.9. I was trying to get it to 2.3.X before going to the latest version. I read that 2.X doesn't use serialize but JSON but I haven't been able to find how I upgrade my 1.4.9 to that.ADD Creative wrote: ↑Sat Jan 01, 2022 11:31 pmThat's not serialized data it looks more like JSON encoded. JSON is used in later versions of OpenCart. It looks like you have got something mixed up somewhere.
What versions are you upgrading from and to?
2.1.0.0 was the first version to use JSON for the settings. It sounds like you have already run the updater of a later version, but your index.php is from 2.0.3.1 or earlier.
I will try to get 2.3 to work but I thought I was seeing the same code in the index..phpADD Creative wrote: ↑Sun Jan 02, 2022 6:54 am2.1.0.0 was the first version to use JSON for the settings. It sounds like you have already run the updater of a later version, but your index.php is from 2.0.3.1 or earlier.
Who is online
Users browsing this forum: No registered users and 126 guests