Forums / Upgrading to 1.5.x / Trouble updating database

Trouble updating database

Started by nwce on 12 Mar 2015, 10:00 PM · Views: 2,130

Results 1 to 20 of 27
12 Mar 2015, 10:00 PM
#1
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Trouble updating database

Hi,

Today I have upgraded to v.1.5.4 from v.1.5.3 and have uploaded all of the changed files, reinstalled Paypal module, and put old database info into new database.

I changed both includes/config and admin/includes/config to point to new database and when running the zc_install I get through the first screen, agree to the terms, and then I get a white screen.

I even downloaded another fresh copy of v.1.5.4 from Source Forge just in the event that there was some corruption...but still the same problem.

Has anyone else had this? Also is there a way to disable the warning message on my site "Your Database appears to need patching....." so that it does not frighten off customers??

Thanks,

Jeff

12 Mar 2015, 10:14 PM
#2
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Trouble updating database

Here is the info from the logs to show where the problem of my white screen is occurring??

12-Mar-2015 14:50:33 America/Los_Angeles] PHP Fatal error: Call to a member function MoveNext() on a non-object in public_html/shop/zc_install/includes/classes/class.installer_version_manager.php on line 243

I hope that this helps,

P.S. I found the line in english.php to remove the header on my site warning that the database needs to be patched.

Jeff

12 Mar 2015, 11:48 PM
#3
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Trouble updating database

Also is there a way to disable the warning message on my site "Your Database appears to need patching.....
Yes by allowing zc_install to patch your database up to the current level

Run zc_install and select "upgrade Database only"

Zen-Venom Get Bitten

12 Mar 2015, 11:49 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Trouble updating database

P.S. I found the line in english.php to remove the header on my site warning that the database needs to be patched
This has not fixed the issue at all

Zen-Venom Get Bitten

12 Mar 2015, 11:49 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Trouble updating database

NWCE:

Here is the info from the logs to show where the problem of my white screen is occurring??

I hope that this helps,

P.S. I found the line in english.php to remove the header on my site warning that the database needs to be patched.

Jeff

Might help, but there is certainly more information that would help as well. This helpful information would be the other pieces of information identified in the posting tips that can be seen by scrolling up after selecting the reply button.

It would also be beneficial to look through the posts about Zc 1.5.4 at: http://www.zen-cart.com/showthread.php?215694-Known-Bugs-%28and-fixes%29-with-v1-5-4

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

13 Mar 2015, 3:39 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Trouble updating database

NWCE:

is there a way to disable the warning message on my site "Your Database appears to need patching....." so that it does not frighten off customers??
The way you wrote that suggests that you didn't do a "test upgrade" in a temporary separate copy of your site, to iron out any glitches before applying the upgrade to your live site.

The upgrade docs recommend "testing" your upgrade in order to prevent symptoms which might "frighten off customers":

NWCE:

Here is the info from the logs to show where the problem of my white screen is occurring??

12-Mar-2015 14:50:33 America/Los_Angeles] PHP Fatal error: Call to a member function MoveNext() on a non-object in public_html/shop/zc_install/includes/classes/class.installer_version_manager.php on line 243
In the strictest sense, if line 243 is failing, then 240 and 238 should have failed too. It also could suggest that perhaps your 'products' table is missing (or, since you said you imported it into a new database, then perhaps it didn't import correctly, in which case you really shouldn't have your site 'live' until you fix it).

As usual, without your URL it's hard to offer detailed help.
Try adding &debug=ON to the end of your URL when on the zc_install "database upgrade" page, and see what status info it dumps onto the screen for analysis.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

13 Mar 2015, 12:58 PM
#7
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Trouble updating database

Thank you all for your replies.

I will try turning on Debug mode as your suggested when running the zc_install to see what info comes up to help in diagnosing this problem.

Thanks again,
Jeff

14 Mar 2015, 5:52 PM
#8
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Trouble updating database

Hi Dr.Byte,

Thank you for your reply. Yes, in checking the databases in MySQL I see that my new database has only 162 tables and not the right Mb of info versus my 250 tables in my v.1.5.3.

I use the import function in MyPhPAdmin in Cpanel to transfer this old database into new, but in trying several times to import into 1.5.4 database it still gives me the same result. My database is quite large so I am wondering if it is timing out or corrupting when uploading (even though I do not receive any error messages when doing this).

Is there an easier way to import my database using the Database Backup MySQL plugin that I have installed on my current 1.5.3. When I change my config files to point to the new database and then try to access admin area before running zc_install to update the database I get the 0071 error.

Would it be best to create another new database for v.1.5.4 than the one I have as it doesn't have all of the tables, and I wouldn't get the 0071 error?

Sorry for what may seem like and elementary question, but I appreciate the help!

Kind regards,
Jeff

14 Mar 2015, 6:51 PM
#9
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Trouble updating database

NWCE:

Thank you for your reply. Yes, in checking the databases in MySQL I see that my new database has only 162 tables and not the right Mb of info versus my 250 tables in my v.1.5.3.

Although the number of tables you have may be correct, it seems a little high to me. A 'typical' ZenCart installation only has ~110 tables.

NWCE:

I use the import function in MyPhPAdmin in Cpanel to transfer this old database into new, but in trying several times to import into 1.5.4 database it still gives me the same result. My database is quite large so I am wondering if it is timing out or corrupting when uploading (even though I do not receive any error messages when doing this).

It is possible for either of this things to be occurring, but it is quite unusual that if this is the case you aren't seeing any error messages.

NWCE:

Is there an easier way to import my database using the Database Backup MySQL plugin that I have installed on my current 1.5.3.

Sorry, but I can't comment about this plugin. I've only ever used the phpmyadmin export/import method.

I will suggest that when you do the export (with phpmyadmin) that you select the option to compress the file, as this tends to take care of any timeout issues (the resulting files are up to 10times smaller). Also, if the files are compressed you'll avoid the possibility of any corruption with the import (unless the compressed file itself get corrupted, and if this does happen you'll be notified of the problem after the upload, but before any 'import' actually starts.

NWCE:

Would it be best to create another new database for v.1.5.4 than the one I have as it doesn't have all of the tables

Another of the phpmyadmin export options is "Add Drop Table". If you enable this, then when the import is taking place any pre-existing tables will be dropped and recreated prior to the actual data being imported, which effectively gives you a 'clean' database (in practical terms, this is almost the same as creating a new database).

I'm not sure if any of this helps or not.

Cheers
RodG

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

14 Mar 2015, 7:26 PM
#10
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Trouble updating database

Hi Rod,

Thanks for your reply and help. I actually export a zipped database from the Backup MySQl plug in I have installed in Zen cart. As for the number of tables, I got this number from MyPHP Admin, when I look at my v.1.5.3 database and scroll to the very bottom, it shows 250 tables. I am not sure why this would be such a vast difference from the 110 that you suggested.

Thanks again for your help,

Jeff

14 Mar 2015, 9:56 PM
#11
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Trouble updating database

Hello again,

I have tried deleting my new v.1.5.4 database in MySQL and then creating a new one and tried Importing in the old v.1.5.3 database into this v.1.5.4 one using PHPMyAdmin Import. After it completes, I still only get 160 tables and when looking in MySQL Databases in Cpanel to look at the size....my current v.1.5.3 is 232 Mb and my v.1.5.4 is only 200Mb.

Still stumped as to why it is not importing the entire database.

Does anyone have any other suggestions?

Thanks in advance,

Jeff

14 Mar 2015, 10:36 PM
#12
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Trouble updating database

NWCE:

Hello again,

I have tried deleting my new v.1.5.4 database in MySQL and then creating a new one and tried Importing in the old v.1.5.3 database into this v.1.5.4 one using PHPMyAdmin Import. After it completes, I still only get 160 tables and when looking in MySQL Databases in Cpanel to look at the size....my current v.1.5.3 is 232 Mb and my v.1.5.4 is only 200Mb.

Still stumped as to why it is not importing the entire database.

Does anyone have any other suggestions?

Thanks in advance,

Jeff

If you export your "new"database, is the size the same as the export of the old database? Might not be the import process, but instead the export process that is changing things.

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

14 Mar 2015, 11:14 PM
#13
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Trouble updating database

Hi mc12345678,

Thanks for your reply and suggestion. The export process that I am using is from a Zen Cart plugin Backup My SQL, and I have done a couple today, to insure it wasn't being corrupted during the process.

The biggest thing I see in my "new" database is the tables only go down to "Paypal" and then no other tables are importing after that, even though when I look at my old database they are all there. I have tried doing a check database in Cpanel, and all items say OK. Not sure why the remaining tables are not being imported in.

Any ideas?

Thanks again,

Jeff

14 Mar 2015, 11:36 PM
#14
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Trouble updating database

NWCE:

Hi mc12345678,

Thanks for your reply and suggestion. The export process that I am using is from a Zen Cart plugin Backup My SQL, and I have done a couple today, to insure it wasn't being corrupted during the process.

The biggest thing I see in my "new" database is the tables only go down to "Paypal" and then no other tables are importing after that, even though when I look at my old database they are all there. I have tried doing a check database in Cpanel, and all items say OK. Not sure why the remaining tables are not being imported in.

Any ideas?

Thanks again,

Jeff

So, with that in mind, there are a few things possible here. The tables that have not been transferred over, do they start with the same prefix as the tables that are transferred?

160 tables is a great number of tables more than a default install that even has several other modifications associated...

The default install has just under 100, so something has added at least 60 tables to your database.

So in answer to teh question of any ideas, well thinking that the backup program is doing what it is expected to do which would be to backup the database information applicable to your store and that the remaining tables are not so associated because they do not fit the parameters... Just my thought on the matter when using this method of backup and without further information.

The other part of it, and if I remember correctly is associated with your issue is that perhaps there is a timeout occurring that is killing the process too early. Perhaps could copy the backup file, edit it to remove the first set(s) of tables and try to upload just the remaining tables.

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

15 Mar 2015, 12:33 AM
#15
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Trouble updating database

Thanks again for your reply mc12345678.

Upon closer examination my tables in my database (current one as well) basically has 3 sets of the same tables. The first set has no prefix to it, and the identical second set of tables has a prefix, and the third set has a different prefix (the one that I associate with my database when filling in the information during zc_install). All of these three sets make up my complete database of 250 tables. Our store is 9 years old, but I have only taken over the upgrading process, etc. over the last 4 years and have always just copied current databases into new when upgrading.

I have checked and there is information in all of these but it appears that the last set has the up to date information. (i.e. when I look at the customers table, it contains the correct number of entries as compared to my Zen admin panel results, as well as all 2015 data.) The other 2 tables look to only contain some info and dates back to 2007 and some in 2012. I have only checked a couple of tables information to find this out, not all of them.

So, this is a whole new kettle of fish! Can I simply delete the extra 2 sets of tables? Is it best to delete them from MyPHPAdmin? I would do a database backup, put the site down for maintenance, delete the 2 sets of tables that seem to be not necessary, and then see if my site runs as it should. Is this the best idea?

Thanks again for your help,
Jeff

15 Mar 2015, 12:59 AM
#16
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Trouble updating database

All of these three sets make up my complete database of 250 tables.

Sorry to edit the last post...there is a second page to my current database when displaying in PHPMyAdmin with an additional 59 tables so a total of 309. My "new" database still only has the one page with 160.

Jeff

15 Mar 2015, 1:23 AM
#17
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Trouble updating database

So, yes before making database changes, a trusted backup should be made...

Next,if you have duplicates of table names with the difference only being the prefix (and of course content) then I would suggest deleting the duplicates. Of course need to know which table prefix is your live table prefix.. (DB_PREFIX in includes/configure.php)

So if the DB_PREFIX is zen_ for your active store, then configuration, zc_configuration, longlist_configuration could all be removed and not affect your current store. Would also suggest looking at the structure of the table(s), to ensure that even though there is a "different" prefix that the table doesn't represent something else that is instead important.

It's no wonder that the database size is so large, there are something like 4 different stores in it.

Generally speaking though, shouldn't have to place the store in maintenance mode...if doing things right, then the rest of the world wouldn't even know that there was anything going on in the background.

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

15 Mar 2015, 2:02 AM
#18
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Trouble updating database

Thanks for your help with this mc12345678. I will try this tomorrow and will post back once done to let you know and hopefully others if they are having the same issue.

Thanks,

Jeff

15 Mar 2015, 4:08 PM
#19
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Re: Trouble updating database

Most hosting providers place a limit on how long a PHP script (such as phpMyAdmin) can run before the script is foribly terminated. When this happens, data will be only patially imported. By defualt phpMyAdmin when importing has an option to "skip" portions of the import when it detects the amount of time is reaching this limit imposed by the hosting provider.

The usual fix is to use an alternative tool to import the data (commandline via SSH; Backup MySQL module for Zen Cart uses exec w/ commandline to restore)... Or break the original export into smaller amounts (via phpMyAdmin or another tool), and import each smaller amount one at a time.

So yes, limiting your export to just the currently in use tables should help!

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

15 Mar 2015, 4:47 PM
#20
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Trouble updating database

Hi lhungil,

Thanks for this info on the limits. I appreciate it! I did not know this, and will try your suggestions. Do you know how to import the database into the new v.1.5.4 using the Zen Cart Backup MySQL tool as I have it installed and would love to be able to use it to import my database as I then for sure won't run into the timeouts.

Thanks again,
Jeff