Zen Cart Logo
Forums / Upgrading to 1.5.x / Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

Views: 4,332

Results 1 to 16 of 16
29 Dec 2021, 7:42 PM
#1
foghead avatar

foghead

New Zenner

Join Date:
Dec 2021
Location:
Tennessee
Posts:
43
Plugin Contributions:
0

Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

I have been up and running with ZenCart 1.51 since 2013. The site has worked very well over the years. It is not really a public online
sales site as it is used for our dealer purchases only. I disabled the option to create an account and only approved customers which
I add can access the site. I am now in the process of upgrading to Zen Cart 1.57c on a test site as I need to keep the old site up
while upgrading.
I have completed the install of 1.57c and attempted to import the database from a backup of the 1.51 site.
I have two problems, one is when importing the 1.51 database to the new 1.57c database page two of the 1.51 database is not importing.
The import was performed in myphp. The second issue is when I open the 1.57c admin site the customers are not showing up.
The customer data is present in the new database. Categories load but not the products as the products are not present up in the new
database after import.
Any idea how to resolve these issues? Any help will be greatly appreciated.

My site is running on a GoDaddy shared Linux server which is currently running.
Server OS: Linux 2.6.32-954.3.5.lve1.4.86.el6.x86_64
Database: MySQL 5.6.51-cll-lve Database Date: 12/29/2021 12:39:06
Server Date: 12/29/2021 19:39:06
Server Up Time: 12:39:06 up 97 days, 16:07, 0 users, load average: 0.51, 0.82, 0.77
HTTP Server: Apache
PHP Version: 5.6.40 (Zend: 2.6.0) PHP Memory Limit: 128M
PHP File Uploads: On Max Size: 32M POST Max Size: 32M
Database Data Size: 33,627 kB

29 Dec 2021, 10:16 PM
#3
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

when importing the 1.51 database to the new 1.57c database page two of the 1.51 database is not importing.
What do you mean by this...what error is shown where?
I find importing via phpmyadmin to be very very slow, compared to a command-line operation which takes seconds.

31 Dec 2021, 9:14 PM
#4
foghead avatar

foghead

New Zenner

Join Date:
Dec 2021
Location:
Tennessee
Posts:
43
Plugin Contributions:
0

Re: Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

After looking further into this issue I believe the problem is in importing to the the old
Zen Cart 1.5 database into the new Zen Cart 1.7c database with myphp.
Many of the tables are not being imported.
Is the database from Zen Cart 1.5 compatible with Zen Cart 1.57c database?
Any ideas on how to resolve this issue.
Thanks

31 Dec 2021, 9:37 PM
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

Please see post #2. You need to do a zc_install.

3 Jan 2022, 6:30 PM
#6
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
507
Plugin Contributions:
1

Re: Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

torvista:

What do you mean by this...what error is shown where?
I find importing via phpmyadmin to be very very slow, compared to a command-line operation which takes seconds.

I assume that you are starting with an empty database. In not then remove all the tables and do the import. Or if you are usin phpmyadmin then set the export options

Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT / TRIGGER statement
Add CREATE TABLE statement

Also on import make sure

Enable foreign key checks

is unset.

Finally check the size of your file and what your server will allow to be imported. If it is too large you may either have to compact the file (zip it) or break it into bits.

If this is teaching grandma to suck eggs sorry.:smile: But thought I would add this as they are issues i have encountered loading databases.

3 Jan 2022, 6:45 PM
#7
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

teaching grandma to suck eggs

WOW! I did not know that one. England and the United States - two countries divided by a common language! :)

https://en.wikipedia.org/wiki/Teaching_grandmother_to_suck_eggs

3 Jan 2022, 9:06 PM
#8
foghead avatar

foghead

New Zenner

Join Date:
Dec 2021
Location:
Tennessee
Posts:
43
Plugin Contributions:
0

Re: Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

Thanks for the replies. I am surprised that I am having this much of a struggle upgrading. I can't seem to get past the database import. When i ran the initial Zen Cart install
I changed the name of the new database to testdatabase with new database user name and password. I kept the admin user name and password the same as the live site.
The live site is where the database I need to use came from. After the Zen Cart install I can login to the admin site with out issue. The database is empty for the most part. When i go back and run Zen Cart install a second time to update database it will not accept the admin user name and password. What is the correct way to update the database after Zen Cart install? i have read the instructions repeatedly and fail. If i do an import in myphp after the install I can not login to the Zen Cart admin site. It says user name or password in incorrect.
I am very confused at this point.

4 Jan 2022, 11:32 AM
#9
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
507
Plugin Contributions:
1

Re: Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

So just to clarify.

  1. you have an old wroking version of zen cart complete with database.
  2. you have copied the complete site to a new directory on your server or on to a test server. lets call it the test area
  3. you have copied the old databse to a new database with necessayr permissions on the new database
  4. you have modified the config files to point at the new data base and checked you can log in to admin and that the sites works in the test area
  5. you have compared the base code in your old version of zen cart with the new version (1.5.7) and made any changes necessary to any non base files or files that were modified for your install.
  6. you have uploaded the new version of zen cart to your test area and any files that needed changing because of modifications.
  7. you have run zcinstall and it has updated the database on your test area
  8. you have removed the zcinstall directory from the test area
  9. you are trying to login to admin (test area) using the login and password from your old working version of zen cartand it is not letting you.

From what you said it sound like you have done a fresh install of 1.5.7 and created a new databse then tried to put an old database over the top. This will potentially have issues as the table structures will probably be different.

Try

  1. copying the old database to a new database and set necessary permissions to the new database
  2. change the config files to point at the new database
  3. make sure zcinstall directory in on the server
  4. run zcinstall to update the databse
  5. rename/delete zcinstall (rename makes it easier to redo install if you need to) Delete when you are happy all is ok.
  6. log in with username and password from live version.
4 Jan 2022, 5:32 PM
#10
foghead avatar

foghead

New Zenner

Join Date:
Dec 2021
Location:
Tennessee
Posts:
43
Plugin Contributions:
0

Re: Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

Thanks brittainmark I appreciate your time and help.
It appears I have been approching this entirely wrong. I did a new clean install of 1.57c and attempted to work from there.
I didn't realize I was creating my own problems.
I will follow your recommendation's and start over.
Nothing is ever as easy as one wants it to be.

4 Jan 2022, 6:21 PM
#11
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

Regarding the import settings, for a local Windows installation using a 163MB sql file (production database) for the import, it always times out at 5 minutes irrespective of the options chosen.
Whereas importing from the command line takes 18 seconds. I usually put the sql in the mysql/bin directory to avoid having to type paths and open the terminal in there.
Command:
mysql -uDATABASEUSER -pPASSWORD DATABASENAME <FILENAME.sql

8 Jan 2022, 9:49 PM
#12
foghead avatar

foghead

New Zenner

Join Date:
Dec 2021
Location:
Tennessee
Posts:
43
Plugin Contributions:
0

Re: Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

Thanks very much brittainmark. You saved my ###### on this one. Clearly I was going about the upgrade entirely wrong.
I followed your suggestions, and all is well with the upgrade. I just need to clean up a few loose ends and do some more testing.
I have not tested the payment module yet, I but it appears everything else is functioning correctly.
I will now start researching how to transfer this over to the live serve.
Thanks once again to you and all who chimed in.

10 Jan 2022, 3:10 AM
#13
foghead avatar

foghead

New Zenner

Join Date:
Dec 2021
Location:
Tennessee
Posts:
43
Plugin Contributions:
0

Re: Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

Just as I thought I had it licked I ran into a new issue.
I copied the updated 1.57c sales site to the live server, as it was working without issues.
Everything was fine with the admin site or the store site.
I then went to my GoDaddy account and changed the PHP version from 7.4 to PHP 8.
After that change the store front would not open. I get a (Server Error 500).
The admin is still functional.
Any ideas what causes this problem?
Thanks much. I'm so close now.

10 Jan 2022, 8:21 AM
#14
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

The debug log will tell you the location of the fault.
Compare the corresponding file in Github 1.5.7 and 1.5.8 as it will probably have already been resolved.
This is why you should be using the latest php on your local server, to get advanced warning of such things.
You should never change the production php version without testing elsewhere first, these problems will always happen as php gets more strict every time by design.

10 Jan 2022, 11:29 AM
#15
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

I then went to my GoDaddy account and changed the PHP version from 7.4 to PHP 8.

Stick with 7.4 for now. We're still resolving issues with PHP8.

11 Jan 2022, 5:00 PM
#16
foghead avatar

foghead

New Zenner

Join Date:
Dec 2021
Location:
Tennessee
Posts:
43
Plugin Contributions:
0

Re: Importing database from 1.51 to new install of 1.57c. Products, Customers not loading

After looking into the debug logs I see I have an issue with the template Professional Blue that was installed
on the 1.51 version. It appears that it may outdated. I am going to work on replacing it with a current one.
I will also stay with PHP 7.4 for now as suggested.
Once again, thanks for all the information.