Forums / Upgrading to 1.5.x / Upgrading database not working (1.3.9 to 1.5.1)

Upgrading database not working (1.3.9 to 1.5.1)

Views: 1,786

Results 1 to 20 of 25
16 Oct 2014, 7:54 PM
#1
lafhaha avatar

lafhaha

New Zenner

Join Date:
Apr 2010
Posts:
22
Plugin Contributions:
0

Upgrading database not working (1.3.9 to 1.5.1)

I'm trying to rebuild/upgrade my zencart site and have been having some trouble. I tried the export old > import to new DB step, but my export function in phpmyadmin keeps adding a create db command (even when I leave that box unchecked) and I'm not comfortable with sql enough to go in and erase the command. Is that all I do? Erase those two lines of code?

In lieu of this, I saw the copy database function and decided to try that. They are on the same server so why wouldn't that work? I tried it, and from what I can see, it went well. I changed my config files and went to do the db upgrade step, and it doesn't look like it worked. My shop is empty. No customers, products...anything went over, even though the database is there, full and can be connected to for the upgrade. I got a ton of messages during the upgrade...mostly that steps were skipped because 'xyz already exists.' In some cases it was 'xyz doesn't exist.' I tried the process of upgrading several times. :no: I feel frustrated and really stupid. Any help/thoughts would be greatly appreciated.

16 Oct 2014, 9:57 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Upgrading database not working (1.3.9 to 1.5.1)

So thing is here, which database is associated with which version of code? It may be that the old version ofcode is trying to access the new version of the database or the other way around... The messages you saw about the database steps sound typical. If however, you got an error.. Type message that is another story.

If you don't mind navigating around a few places, you would want to be sure that the store files you are accessing are the most up-to-date (1.5.1) and that the includes/configure.php file for that set of files is pointed at the database that has been upgraded...

Okay, and to add to that it may be wise to clear the cache of your browser... Just in case if not already done.

Also may want to check the logs directory (area where error messages are now stored in 1.5.1)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

16 Oct 2014, 10:44 PM
#3
lafhaha avatar

lafhaha

New Zenner

Join Date:
Apr 2010
Posts:
22
Plugin Contributions:
0

Re: Upgrading database not working (1.3.9 to 1.5.1)

I will take a look at the logs directory.

This is a short version of the steps I did, hopefully this makes things a little more clear:
Copied old 1.3.9 DB to brand new DB.
Set up New 1.5.1 Store. (This still works fine if I point the config files back to the DB that it was installed with.)
Changed config files of New Store to point to New DB with copied 1.3.9 Info. (double checked all my settings.)
Went to zc_install/index.php and stepped through to the Upgrade process for the DB. Got pink and yellow messages, for 'skipped' items in the upgrade process. No fatal errors.
Changed permissions on config files, changed my admin back and deleted zc_install folder.
Logged into New Store with Supposedly Upgraded DB. Nothing is there, no products, no customers, nothing. Store works fine it's just empty.

16 Oct 2014, 10:53 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Upgrading database not working (1.3.9 to 1.5.1)

And if use myphpadmin to look at the upgraded database, the data is there? Wondering if the database collation is the issue with probably using latin related database "settings" as compared to the current utf-8 data. There is a pluginby dr.byte that does that update/conversion. But if the database is empty that is something different entirely.

Btw, just snagged this from one of dr.byte's recent post. This is the way he does things: http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

16 Oct 2014, 11:07 PM
#5
lafhaha avatar

lafhaha

New Zenner

Join Date:
Apr 2010
Posts:
22
Plugin Contributions:
0

Re: Upgrading database not working (1.3.9 to 1.5.1)

Yup. The data is there and so is the structure. After I ran the upgrade I checked again and there were 4 things added to the new DB. So it looks like this: OldDB (190) and NewDB (194). The tables are all there.

Dr Byte's guide is pretty much exactly what I did. My old site is still live and I've done all of this on a temp site.

16 Oct 2014, 11:37 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Upgrading database not working (1.3.9 to 1.5.1)

lafhaha:

Yup. The data is there and so is the structure. After I ran the upgrade I checked again and there were 4 things added to the new DB. So it looks like this: OldDB (190) and NewDB (194). The tables are all there.

Dr Byte's guide is pretty much exactly what I did. My old site is still live and I've done all of this on a temp site.

Configure.php files show the same table prefix as populated in the database?
Collation of the fields in the database?
http://www.zen-cart.com/downloads.php?do=file&id=1318

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

17 Oct 2014, 12:13 AM
#7
lafhaha avatar

lafhaha

New Zenner

Join Date:
Apr 2010
Posts:
22
Plugin Contributions:
0

Re: Upgrading database not working (1.3.9 to 1.5.1)

mc12345678:

Configure.php files show the same table prefix as populated in the database?
Collation of the fields in the database?
http://www.zen-cart.com/downloads.php?do=file&id=1318

Yes, there was no prefix before and there's no prefix now.

They are all UTF-8.

Here are some screen caps of the old and new DB's in phpmyadmin:
New DB (1.5.1):
Attachment 14604

Old DB (1.3.9)
Attachment 14605

17 Oct 2014, 12:38 AM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Upgrading database not working (1.3.9 to 1.5.1)

Hadn't asked yet, but what was the method of establishing the new files? Where did they come from? Said that pretty much followed that procedure, what step(s) were omitted or altered and how?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

17 Oct 2014, 12:55 AM
#9
lafhaha avatar

lafhaha

New Zenner

Join Date:
Apr 2010
Posts:
22
Plugin Contributions:
0

Re: Upgrading database not working (1.3.9 to 1.5.1)

First of all, thank you so much for your time and helping me try and sort this out. I really appreciate it. :) I'm not quite sure if this is what you're asking for, but here are the steps with the sources for all the files I used and info.

The new shop was established through an automatic installer on my webhost. It installed version 1.5.1.
Completed fresh installation of 1.5.1, deleted zc_install and renamed my admin folder.
I worked on this fresh install for a while setting up my theme and getting the hang of the new version. When I was ready to merge the live shop info, this is what I did:

I went into phpmyadmin, made a new DB, and copied the Old DB over through phpmyadmin.
I used the 'copy database' operation as I could not get the export Old DB > import into New DB step to work.
Downloaded a fresh 1.5.1 zip because I didn't still have the original zc_install folder.
Uploaded zc_install to the New Shop.
Changed DB info on the 2 config files to the new DB and uploaded them.
Changed permissions on the config files.
Changed the name of my admin folder back to /admin so the update would be able to find stuff.
Went to zc_install/index.php and ran the upgrader.
the first time through, it automatically ticked the upgrades it was going to do. from 1.3.9>1.5.1.
Got the 'Skipped' messages.
Ugrade complete.
Deleted zc_install, renamed admin, logged in and that's where I am now.

17 Oct 2014, 1:43 AM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Upgrading database not working (1.3.9 to 1.5.1)

No problem, so able to use your old admin password to login to the admin side where no catalog data appears to show?

In the grand scheme of things, the version of 1.5.1 placed. On the server really should be the rest of the files that were with the zc_install folder. Could do a couple of things (take different approaches) to identify what the issue is, if that knowledge would help, but could compare the files of each, delete from the new install anything thatis not in the ZC default, then overwrite the files with the ZC default.

I'm wondering also, what plugins were previously installed? The template right now, it is the ZC original default yes? Not modified?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

17 Oct 2014, 2:32 AM
#11
lafhaha avatar

lafhaha

New Zenner

Join Date:
Apr 2010
Posts:
22
Plugin Contributions:
0

Re: Upgrading database not working (1.3.9 to 1.5.1)

Yes, I can log in fine. Everything works, it's just there's no 'old' data from the merge. Even though it is there in the DB.

I actually didn't have many plugins added on the old shop. Now that I think about it, I have paypal as the payment gateway and I had a free shipping module, but I think that both came in 1.3.9. The 1.5.1 only has my custom theme added. No plugins.

I don't think it's anything with the ZC files themselves...when I switch the config files back and set it to the original 1.5.1 DB, everything that was in that version comes back.

17 Oct 2014, 2:36 AM
#12
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Upgrading database not working (1.3.9 to 1.5.1)

Try changing the theme to the ZC "classic" theme...

Does that custom theme include changes to the admin?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

17 Oct 2014, 2:40 AM
#13
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Upgrading database not working (1.3.9 to 1.5.1)

Ugh. I forgot there is a "script" to be run because of the change of the database location thatmay be causing some of the issue. Database cache rest utility I think. I'll see if I can find it quickly.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

17 Oct 2014, 2:43 AM
#14
lafhaha avatar

lafhaha

New Zenner

Join Date:
Apr 2010
Posts:
22
Plugin Contributions:
0

Re: Upgrading database not working (1.3.9 to 1.5.1)

I switched the theme and nothing changed. Still no products, orders, etc.

On the changes to admin, not to core files, no. Just one change to the htaccess file.

17 Oct 2014, 2:44 AM
#15
lafhaha avatar

lafhaha

New Zenner

Join Date:
Apr 2010
Posts:
22
Plugin Contributions:
0

Re: Upgrading database not working (1.3.9 to 1.5.1)

mc12345678:

Ugh. I forgot there is a "script" to be run because of the change of the database location thatmay be causing some of the issue. Database cache rest utility I think. I'll see if I can find it quickly.

Oo! ok! Thank you!

17 Oct 2014, 2:46 AM
#16
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Upgrading database not working (1.3.9 to 1.5.1)

lafhaha:

I switched the theme and nothing changed. Still no products, orders, etc.

On the changes to admin, not to core files, no. Just one change to the htaccess file.

Huh?! Change to the .htaccess file to support a template? Please explain, that's a new one...

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

17 Oct 2014, 2:52 AM
#17
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Upgrading database not working (1.3.9 to 1.5.1)

mc12345678:

Ugh. I forgot there is a "script" to be run because of the change of the database location thatmay be causing some of the issue. Database cache rest utility I think. I'll see if I can find it quickly.

lafhaha:

Oo! ok! Thank you!

Found it, http://www.zen-cart.com/downloads.php?do=file&id=8 (fix_cache_key utility)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

17 Oct 2014, 2:59 AM
#18
lafhaha avatar

lafhaha

New Zenner

Join Date:
Apr 2010
Posts:
22
Plugin Contributions:
0

Re: Upgrading database not working (1.3.9 to 1.5.1)

mc12345678:

Huh?! Change to the .htaccess file to support a template? Please explain, that's a new one...

In the documentation it says they were modified for better display of the specials page. htaccess and Includes>Modules>Pages>Specials>main_template_vars.php. I have original state files to replace them with if/when I want to uninstall the theme.

17 Oct 2014, 3:02 AM
#19
lafhaha avatar

lafhaha

New Zenner

Join Date:
Apr 2010
Posts:
22
Plugin Contributions:
0

Re: Upgrading database not working (1.3.9 to 1.5.1)

mc12345678:

Found it, http://www.zen-cart.com/downloads.php?do=file&id=8 (fix_cache_key utility)

Ok! trying this and will post the results!

17 Oct 2014, 3:07 AM
#20
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Upgrading database not working (1.3.9 to 1.5.1)

lafhaha:

Ok! trying this and will post the results!

lafhaha:

In the documentation it says they were modified for better display of the specials page. htaccess and Includes>Modules>Pages>Specials>main_template_vars.php. I have original state files to replace them with if/when I want to uninstall the theme.

If the first of this message is unsuccessful, please post the .htaccess content (obscure any reference to the admin directory(ies) if there is any or other "sensitive" information) place the content between [ CODE ] [ /CODE ] tags (with space removed between [].)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...