Post by Randem » Thu Dec 17, 2015 4:18 pm

I wanted to upgrade from 1.5.x to 2.1.x and I did the following:
  • Created New FTP upload location
    Exported Production Database into SQL text file
    Created new test database
    Imported SQL dump into new test database
    Uploaded 2.1.0.1 software folder to new FTP upload location
    Copied config.php from production root folder to new FTP upload folder
    Copied config.php from admin folder to new FTP upload admin folder
    Ran the install.php file from the upload install folder
Now I proceeded to upgrade and got these error messages:

Warning: mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user 'RSOpenCartTest'@'50.63.197.62' (using password: YES) in /home/content/57/10005557/html/opencarttest/system/library/db/mysqli.php on line 7

Notice: Error: Could not make a database link (1045) Access denied for user 'RSOpenCartTest'@'50.63.197.62' (using password: YES) in /home/content/57/10005557/html/opencarttest/system/library/db/mysqli.php on line 10

Warning: mysqli::close() [mysqli.close]: Couldn't fetch mysqli in /home/content/57/10005557/html/opencarttest/system/library/db/mysqli.php on line 58


Now, when I did a separate test with a straight install with the same config.php files all worked. Why can't the upgrade log into the database to upgrade (old format)? The config.php are exactly the same... What do I need to do to get this conversion to work?

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by yodapt » Thu Dec 17, 2015 4:27 pm

The config files are not exacly the same in those versions, there are some changes, and there are alot more changes in the database scructure, so it is bound not to work like that. Migrations from such different versions aren't easy at all, why do you want to migrate to 2.1.x?

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by Randem » Thu Dec 17, 2015 4:46 pm

Why would I NOT want to migrate to 2.1.x??? I don't understand the question.
I followed the OpenCart directions to upgrade... Aren't those directions correct?

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by yodapt » Thu Dec 17, 2015 5:04 pm

Yes they are not correct, or not complete. It is common to read in the forums that if your store is working, dont fix it.

You can of course have reasons to want to upgrade, it's just that it's not the best idea for everyone, you might not have modules for 2.1.x that you have on 1.5.x, that is something you need to check amongst others, before choosing.

Modules, Themes, Extensions, etc, you need to check them all first. You also need to take into account any custom made changes to the database will not be portable alone, and you need a tool or knowledge to port the old data into the new database regarding the tables that changed meanwhile.

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by Randem » Thu Dec 17, 2015 5:11 pm

OK, yes this is why we run a test for the upgrade so that we can see what will work and what will not or needs to be changed. I would have thought that the developers would have written a script for the database changes and that would be included in the "Upgrade" portion of the install.

Of course we would not change our production system without running test. We want to see if it is viable and also to see if any new stores would be developed in 2.1.x.

Any advise on the database migration? Does it exist?

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by yodapt » Thu Dec 17, 2015 5:15 pm

There are some available in Extensions yes, but you should read the comments on them to check if they really work. I never used one so I don't know much about them, but here's one that seems quite popular :

http://www.opencart.com/index.php?route ... =migration

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by Randem » Thu Dec 17, 2015 5:19 pm

Thanks, Yes I see that the documentation is not that clear on that extension just what will happen. I will give it a try.

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by Randem » Sat Dec 19, 2015 8:14 am

The upgrade is indeed busted... I managed to correct some of the minor issues in the upgrade due to it NOT stepping thru the tables properly and attempting to drop and index that it already changed. Now I am getting some JSON errors and implode errors which probably means that the upgrade forgot to do some conversions on the order table (maybe more). Here is a picture of the error I am getting after the conversion is complete and attempting to log on to the admin panel.

It is very obvious that this upgrade was not properly tested... If I had the proper information I could make this upgrade work for all prior versions. Is this information about the differences in version available?

Attachments

OC_Error1.png

Error from the admin panel after a "Good" Upgrade - OC_Error1.png (429.38 KiB) Viewed 4315 times


NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by IP_CAM » Sat Dec 19, 2015 9:01 am

You just don't seem to understand the Situation, Opencart v.2.x is not longer compatible with it's former Versions. It's a NEW Version, under steady Construction, and a new Concept, as well, and not even compatible withhin v.2.x itself. But it NEVER has been planned to be upgradable by a DEFAULT built-in Update Routine, to upgrade v.1.x Versions to latest Spec's.

Just accept this, or leave it, it will not make any difference, to anyone, around here. But please, just don't try to start an argumentative discussion, on wheter OC should have made it different, or what else, it would end up, at the very worst, with a nasty Comment of our Chief in Command, telling you, to f... off. ;D

Good Luck
Ernie
bigmax.ch/shop/
Last edited by IP_CAM on Thu Jan 07, 2016 5:25 am, edited 1 time in total.

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by Randem » Sat Dec 19, 2015 9:14 am

If you can't be helpful why annoy? Data portability has nothing to do with program compatibility... There has NEVER been a system that I have worked on that my data could not be ported to the latest version...

Telling someone other than that is just plain inexperience...

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by Randem » Sat Dec 19, 2015 5:34 pm

I found the answer to this issue. It was the oc_settings table. The contents of this table has to be truncated and new data inserted into the file. I have included the SQL needed to do this. There are more issue and I will post them as I solve them to get a working migration tool to the latest version (with detailed instructions)
Last edited by Randem on Mon Dec 21, 2015 1:04 pm, edited 1 time in total.

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by Randem » Sat Dec 19, 2015 6:37 pm

Another issue solved with being denied access to certain areas of OpenCart in the Admin panel. Please use the following SQL to remedy this situation ONLY if you have the default user groups (2). If you have more user groups, just replace the permissions for the Top Administrator for now.
Last edited by Randem on Sun Dec 20, 2015 7:55 am, edited 2 times in total.

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by Randem » Sun Dec 20, 2015 3:45 am

In order to get to the point where I had the original issue, I have attached the upgrade.php that I used. It has two minor changes but will get you to the point where information in some tables needs to be changed (prior posts with attachements in this thread). The original author of this script did an ingenious job with the table conversions which can be used to move the database from any prior version to any later version with a few modifications. Only a few tweaks need to be made to get the database information almost totally correct to run with the OpenCart software for that version.

Of course this should be done on a copy of the database and the newer software uploaded for the newer version. I will post more changes as I find them until I have the system working then I will post the instructions on how to migrate successfully.

At the moment I have total access to the Admin Panel (with all my data), but working on the store coming online.

If you want to locate the changes I made, just search for // RJ -
It's old school but that is how we notated what was changed and who made the changes...

Another note: I had to insert a couple of define statements in the config.php files that were missing.

define('DIR_CATALOG', '/home/content/57/10005557/html/**************/catalog/');
define('DB_PORT', '3306');

it was best to do a clean install first to get the config.php files needed for your migration then add the missing parameters. The upgrade file can be found in \upload\install\model
Last edited by Randem on Fri Dec 25, 2015 10:08 am, edited 2 times in total.

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by Randem » Sun Dec 20, 2015 4:47 am

One more file that needed to change to remove some errors. The file can be found in \upload\admin\language\english\common\header.php. Change notation in attached file.

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by Randem » Sun Dec 20, 2015 8:07 am

BTW: In migrating your images you will need to download them from the original site from \image\data\ then upload them to \image\catalog\ in the new location of your OpenCart upload location.

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by Randem » Wed Dec 23, 2015 5:18 pm

The total answer is found in a new thread I started http://forum.opencart.com/viewtopic.php?f=181&t=156002

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by Randem » Sun Jan 03, 2016 5:10 pm

A direct location to the solution, files and directions is here

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by ridersdna » Tue Jan 05, 2016 8:56 pm

i got a similar problem:

i have tried to upgrade opencart from 1.5.3.1 to latest 2.1 but all went wrong, cant sign on to the admin panel and got this errors:

Notice: unserialize() [function.unserialize]: Error at offset 0 of 123 bytes in /home/aratin21/public_html/admin/index.php on line 49

Notice: unserialize() [function.unserialize]: Error at offset 0 of 127 bytes in /home/aratin21/public_html/admin/index.php on line 49

Notice: unserialize() [function.unserialize]: Error at offset 0 of 169 bytes in /home/aratin21/public_html/admin/index.php on line 49

Notice: unserialize() [function.unserialize]: Error at offset 0 of 12800 bytes in /home/aratin21/public_html/admin/index.php on line 49
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/aratin21/public_html/admin/index.php:49) in /home/aratin21/public_html/system/library/session.php on line 11Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/aratin21/public_html/admin/index.php:49) in /home/aratin21/public_html/system/library/session.php on line 11Warning: Cannot modify header information - headers already sent by (output started at /home/aratin21/public_html/admin/index.php:49) in /home/aratin21/public_html/system/library/currency.php on line 45

Plus the website is all down and i got this message on main page:

Not Found

The requested URL /index.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Anyone knows how to fix this?

Newbie

Posts

Joined
Mon Jan 04, 2016 1:42 pm

Post by Randem » Wed Jan 06, 2016 4:59 pm

You did not use the upgrade instructions I posted. This problem would not occur...

NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart


User avatar
Active Member

Posts

Joined
Sat Sep 27, 2014 9:17 am

Post by AllenConquest » Thu Jan 07, 2016 4:33 am

Hi Randem,

This is amazing work, and I'll help as much as I can. I have been following your steps, but I have hit a problem. I got as far as step 10 on your migration guide. So I have loaded my existing data into the newly created empty database. I have copied your upgrade.php file across and tried to re-run the installation. It is not finding some tables that it expects. I'm upgrading from 1.5.5.1. The errors are shown below:

Code: Select all

Notice: Error: Table 'mavis-shop2.0.cart' doesn't exist
Error No: 1146
DELETE FROM cart WHERE customer_id = '0' AND date_added < DATE_SUB(NOW(), INTERVAL 1 HOUR) in /Users/allenconquest/Developer/opencart2/system/library/db/mysqli.php on line 41Notice: Error: Table 'mavis-shop2.0.event' doesn't exist
Error No: 1146
SELECT * FROM event in /Users/allenconquest/Developer/opencart2/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /Users/allenconquest/Developer/opencart2/index.php on line 250Warning: Invalid argument supplied for foreach() in /Users/allenconquest/Developer/opencart2/index.php on line 250Notice: Error: Table 'mavis-shop2.0.layout_module' doesn't exist
Error No: 1146
SELECT * FROM layout_module WHERE layout_id = '1' AND position = 'column_left' ORDER BY sort_order in /Users/allenconquest/Developer/opencart2/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /Users/allenconquest/Developer/opencart2/catalog/model/design/layout.php on line 16Warning: Invalid argument supplied for foreach() in /Users/allenconquest/Developer/opencart2/catalog/controller/common/column_left.php on line 48Notice: Error: Table 'mavis-shop2.0.layout_module' doesn't exist
Error No: 1146
SELECT * FROM layout_module WHERE layout_id = '1' AND position = 'column_right' ORDER BY sort_order in /Users/allenconquest/Developer/opencart2/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /Users/allenconquest/Developer/opencart2/catalog/model/design/layout.php on line 16Warning: Invalid argument supplied for foreach() in /Users/allenconquest/Developer/opencart2/catalog/controller/common/column_right.php on line 48Notice: Error: Table 'mavis-shop2.0.layout_module' doesn't exist
Error No: 1146
SELECT * FROM layout_module WHERE layout_id = '1' AND position = 'content_top' ORDER BY sort_order in /Users/allenconquest/Developer/opencart2/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /Users/allenconquest/Developer/opencart2/catalog/model/design/layout.php on line 16Warning: Invalid argument supplied for foreach() in /Users/allenconquest/Developer/opencart2/catalog/controller/common/content_top.php on line 48Notice: Error: Table 'mavis-shop2.0.layout_module' doesn't exist
Error No: 1146
SELECT * FROM layout_module WHERE layout_id = '1' AND position = 'content_bottom' ORDER BY sort_order in /Users/allenconquest/Developer/opencart2/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /Users/allenconquest/Developer/opencart2/catalog/model/design/layout.php on line 16Warning: Invalid argument supplied for foreach() in /Users/allenconquest/Developer/opencart2/catalog/controller/common/content_bottom.php on line 48Notice: Error: Table 'mavis-shop2.0.cart' doesn't exist
Error No: 1146
SELECT * FROM cart WHERE customer_id = '0' AND session_id = '8uiecfjmgn8c87q9di34amsh67' in /Users/allenconquest/Developer/opencart2/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /Users/allenconquest/Developer/opencart2/system/library/cart.php on line 37Warning: Invalid argument supplied for foreach() in /Users/allenconquest/Developer/opencart2/system/library/cart.php on line 37Notice: Error: Table 'mavis-shop2.0.cart' doesn't exist
Error No: 1146
SELECT * FROM cart WHERE customer_id = '0' AND session_id = '8uiecfjmgn8c87q9di34amsh67' in /Users/allenconquest/Developer/opencart2/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /Users/allenconquest/Developer/opencart2/system/library/cart.php on line 37Warning: Invalid argument supplied for foreach() in /Users/allenconquest/Developer/opencart2/system/library/cart.php on line 37Notice: Error: Table 'mavis-shop2.0.cart' doesn't exist
Error No: 1146
SELECT * FROM cart WHERE customer_id = '0' AND session_id = '8uiecfjmgn8c87q9di34amsh67' in /Users/allenconquest/Developer/opencart2/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /Users/allenconquest/Developer/opencart2/system/library/cart.php on line 37Warning: Invalid argument supplied for foreach() in /Users/allenconquest/Developer/opencart2/system/library/cart.php on line 37Notice: Error: Table 'mavis-shop2.0.cart' doesn't exist
Error No: 1146
SELECT * FROM cart WHERE customer_id = '0' AND session_id = '8uiecfjmgn8c87q9di34amsh67' in /Users/allenconquest/Developer/opencart2/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /Users/allenconquest/Developer/opencart2/system/library/cart.php on line 37Warning: Invalid argument supplied for foreach() in /Users/allenconquest/Developer/opencart2/system/library/cart.php on line 37Notice: Error: Table 'mavis-shop2.0.cart' doesn't exist
Error No: 1146
SELECT * FROM cart WHERE customer_id = '0' AND session_id = '8uiecfjmgn8c87q9di34amsh67' in /Users/allenconquest/Developer/opencart2/system/library/db/mysqli.php on line 41Notice: Trying to get property of non-object in /Users/allenconquest/Developer/opencart2/system/library/cart.php on line 37Warning: Invalid argument supplied for foreach() in /Users/allenconquest/Developer/opencart2/system/library/cart.php on line 37
It can't find the 'cart', 'layout_module' and 'event' tables

New member

Posts

Joined
Tue Sep 06, 2011 9:13 pm
Who is online

Users browsing this forum: Amazon [Bot] and 72 guests