Zen Cart Logo
Forums / Upgrading to 1.5.x / Upgrade database -- but it still shows pre-import data

Upgrade database -- but it still shows pre-import data

Views: 2,968

Results 1 to 18 of 18
31 Dec 2014, 10:08 PM
#1
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
142
Plugin Contributions:
0

Upgrade database -- but it still shows pre-import data

I want to import a database which was backed up from the 1.3.9f site into a 1.5.3 site on a subfolder.

http://rarecoinsandtokens.co.uk/zencart15/index.php

The installation 1.5.3 installation was done with Softaculous.
Which created and named the dbase and pwd, and created the config files.
All worked ok.
I made one test product.
I now want to get the 1.5.3 copy on the subfolder loaded with the 1.3.9f database.

In site cPanel MySQL Databases, I have assigned a user to match the config files.

Using phpMyAdmin, I have navigated to the database named in the config files, and imported the data from the 1.3.9f database zip.

I have then uploaded a copy of zcinstall folder, (since it was deleted by Softaculous to get the new 1.5.3 store running),
and ran the install to the point where it offeres upgrade database.
I have selected that option, and it appeared to work, and invited me to visit the site after renaming admin, and deleting zcinstall folder.

However, the site still shows pre import data.
I have checked the config files, and they seem to have correct paths and names etc. although I have read elsewhere that this is not relevant when using zcinstall to upgrade the database.

I would really appreciate some help with this, since the first upgrade left me without image enlargement functioning on the live site.
http://rarecoinsandtokens.co.uk/
so I need to get this working

Thanks.

(PS I have read several threads, but none which help.
Also, I used Softaculous because my previous manual uploads resulted in the enlargement failure on the live site,
and I wanted to eliminate path errors in the config files which may be causing my live site to stumble.)

SUBFOLDER INSTALL DETAILS
http://rarecoinsandtokens.co.uk/zencart15/index.php
Zen Cart 1.5.3
Database Patch Level: 1.5.3
PHP Version: 5.4.28 (Zend: 2.4.0) PHP Memory Limit: 128M

Database: MySQL 5.5.40-cll

GD Support enabled
GD Version bundled (2.1.0 compatible)
Server Host: enterprise.terrassl.net (212.113.134.236) Database Host: localhost (127.0.0.1)
Server OS: Linux 2.6.18-448.16.1.el5.lve0.8.70

kevin_a

31 Dec 2014, 10:20 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Upgrade database -- but it still shows pre-import data

When comparing the includes/configure.php files between your old site and new site, and looking specifically at the database prefix, is the prefix the same on both sites?
Further, aspart of importing the old data, it sounds like the new data tables were not dropped, otherwise there would not be "pre-import" data available to see. Dropping the tables is part of the database upgrade/import. See: http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading
For some further guidance.

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

1 Jan 2015, 12:10 AM
#3
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
142
Plugin Contributions:
0

Re: Upgrade database -- but it still shows pre-import data

Thanks for the reply.
I recall specifying that the tables be dropped.
What are the consequences of not doing so?

The 1.3.9f database has this in the config

define('DB_DATABASE', 'millenni_db1');

The 1.5.3 database has this in the config

define('DB_DATABASE', 'millenni_zenc15');

Thankyou

kevin_a

1 Jan 2015, 12:15 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: Upgrade database -- but it still shows pre-import data

Out-of-the-box, Zen Cart names its database tables like this:

  • admin
  • customers
  • categories
  • products
  • etc

But done that way only 1 store could be in any 1 database.
Some customers' hosting companies are cheap and allow only 1 database for the entire account, which makes it difficult to run multiple sites or other applications.
So, Zen Cart added the ability to "add a prefix to all the tablenames". Often this is done as "zen_", but some hosts do differently.

Using "zen_" as the prefix, the tablenames would become something like:

  • zen_admin
  • zen_customers
  • zen_categories
  • zen_products
    etc

In your configure.php files you'll see a define for DB_PREFIX. You'll need to copy the same DB_PREFIX setting from your old configure.php into your new ones, else your new one won't know how to find the properly-named tables that you're importing from the old database.

NOTE: DB_PREFIX is NOT the DB_DATABASE setting that you just posted.

.
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.

1 Jan 2015, 12:54 AM
#5
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Upgrade database -- but it still shows pre-import data

kevin_a:

Thanks for the reply.
I recall specifying that the tables be dropped.
What are the consequences of not doing so?

The 1.3.9f database has this in the config

define('DB_DATABASE', 'millenni_db1');

The 1.5.3 database has this in the config

define('DB_DATABASE', 'millenni_zenc15');

Thankyou

I saw Dr. Byte's response, so not going to duplicate that discussion. One thing that I've seen when I have accidentally forgotten to drop the tables before uploading (didn't make total sense either) was that there was no error in the upload of the "new" database, but the data didn't make it and it looked as if I hadn't done anything... Took a step back and realized my mistake of not dropping the tables in advance of uploading the replacement table(s).

Btw, having seen about the issues you've had, in the zc_install file set that was uploaded, have you applied the patch(es) described in: http://www.zen-cart.com/showthread.php?213868-Known-Bugs-%28and-fixes%29-with-v1-5-3

That is before you lose your patience with this process as well, which btw, if you hadn't seen, and somewhat sorry to say, 1.5.4 was released today which doesn't require the patches for the install/upgrade (since they're already included).

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

1 Jan 2015, 1:33 PM
#6
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
142
Plugin Contributions:
0

Re: Upgrade database -- but it still shows pre-import data

mc12345678:

I saw Dr. Byte's response, so not going to duplicate that discussion. One thing that I've seen when I have accidentally forgotten to drop the tables before uploading (didn't make total sense either) was that there was no error in the upload of the "new" database, but the data didn't make it and it looked as if I hadn't done anything... Took a step back and realized my mistake of not dropping the tables in advance of uploading the replacement table(s).

Btw, having seen about the issues you've had, in the zc_install file set that was uploaded, have you applied the patch(es) described in: http://www.zen-cart.com/showthread.php?213868-Known-Bugs-%28and-fixes%29-with-v1-5-3

That is before you lose your patience with this process as well, which btw, if you hadn't seen, and somewhat sorry to say, 1.5.4 was released today which doesn't require the patches for the install/upgrade (since they're already included).

Thank you for the replies..

I have checked the config files for a prefix to the database, and found that the 1.5.3 config files had zen_ prefix, and the original config did not.
So I have removed the prefix in this line.......... define('DB_PREFIX', ' ');
and the store now shows the data as imported.
However..regarding the buggy zc_install package,

I have uploaded the file... **/zc_install/includes/functions/general.php

then added the code...
//KA added as DrByte advised to general.php

define('DIR_FS_CATALOG', zen_read_config_value('DIR_FS_CATALOG', FALSE));
define('DIR_WS_CLASSES', 'includes/classes/');**

BUT
navigating to find the /includes/classes/class.zcPassword.php for the other edit, it does not show in the folder.
there are 3 files in the /classes folder.

**class.installer_version_manager.php
installer.php
message_stack.php

class.zcPassword.php** is not there.

the error message, when I try to run zcinstall to upgrade the dBase because admin log in is asking for that to be done, is
"Admin Password required to proceed with upgrade more info..."

How might I proceed from here please?

kevin_a

1 Jan 2015, 3:06 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: Upgrade database -- but it still shows pre-import data

kevin_a:

Thank you for the replies..

I have checked the config files for a prefix to the database, and found that the 1.5.3 config files had zen_ prefix, and the original config did not.
So I have removed the prefix in this line.......... define('DB_PREFIX', ' ');
and the store now shows the data as imported.
Great!

kevin_a:

However..regarding the buggy zc_install package,

I have uploaded the file... **/zc_install/includes/functions/general.php

then added the code...
//KA added as DrByte advised to general.php

define('DIR_FS_CATALOG', zen_read_config_value('DIR_FS_CATALOG', FALSE));
define('DIR_WS_CLASSES', 'includes/classes/');**

BUT
navigating to find the /includes/classes/class.zcPassword.php for the other edit, it does not show in the folder.
there are 3 files in the /classes folder.

**class.installer_version_manager.php
installer.php
message_stack.php

class.zcPassword.php** is not there.

the error message, when I try to run zcinstall to upgrade the dBase because admin log in is asking for that to be done, is
"Admin Password required to proceed with upgrade more info..."

How might I proceed from here please?

I know you've just got your head around doing the 1.5.3 upgrade, but I want to mention that v1.5.4 has just been released and these class.zcPassword bugs are fixed in it, so no edits are required.

May I suggest that you go to v1.5.4 while you've got this stuff all open?
It's actually simple:
a) just replace the changed files ... ie: the ones changed between 153 to 154. There's a complete list of them in the /docs/changed_files_1.5.4.html file.
b) then run the 154 zc_install

.
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.

1 Jan 2015, 3:18 PM
#8
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Upgrade database -- but it still shows pre-import data

So, to be sure, when looking for the includes/classes/class.zcPassword.php file you are looking in the store path and not in the zc_install path correct?

If that file is not there, then it is because of not using the downloaded version of ZC available from http://www.zen-cart.com/getit

In my opinion you won't like the suggestion... Which would be to follow the process/guidelines of http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading using the "new" files. As for why the "previous" upgrade attempt caused issues, well, it appears that this is the first time that ZC has been installed ina subdirectory and thus leads one to think that the previous upgrade was done in place without a "substitute" or temporary system in place... Therefore, it also would seem that one or more files were either incorrectly updated, omitted, or left as extras... Hopefully you have some form of file comparison utility such as winmerge or beyond compare... Something that performs directory as well as specific file comparisons.

Anyways, such a utility could be used to identify what else is different between the softaculous install and an install that would have been performed using an official copy of the ZC software.

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

1 Jan 2015, 5:55 PM
#9
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
142
Plugin Contributions:
0

Re: Upgrade database -- but it still shows pre-import data

mc12345678:

So, to be sure, when looking for the includes/classes/class.zcPassword.php file you are looking in the store path and not in the zc_install path correct?

If that file is not there, then it is because of not using the downloaded version of ZC available from http://www.zen-cart.com/getit

Following the logic of DrBytes suggestion lead me along this path

  1. Apply the additional fix in posts #8 , #9 below.
    #8
    SOLUTION:
    Edit /zc_install/includes/functions/general.php
    After the opening <?php line, add the following:
    Code:
    define('DIR_FS_CATALOG', zen_read_config_value('DIR_FS_CATALOG', FALSE));
    define('DIR_WS_CLASSES', 'includes/classes/');

#9
Another change which appears to help address the admin-password-rejected-during-database-upgrade issue is:

Edit /includes/classes/class.zcPassword.php
Around line 49 you have this:
if (version_compare($phpVersion, '5.3.7', '<')) {
etc

Since post 9 was sequential to #8 ("another change"), and doesn’t further qualify to admin ‘includes’, and the issue is with the zc_install, I saw no reason to search for other possibilities.
I have now found the file, and edited as recommended, but zc_install reports "password required" even when password is in the text field. It bumps me back to the top.
But Thank you for the pointer.

mc12345678:

In my opinion you won't like the suggestion... Which would be to follow the process/guidelines of http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading using the "new" files. As for why the "previous" upgrade attempt caused issues, well, it appears that this is the first time that ZC has been installed ina subdirectory and thus leads one to think that the previous upgrade was done in place without a "substitute" or temporary system in place... Therefore, it also would seem that one or more files were either incorrectly updated, omitted, or left as extras... Hopefully you have some form of file comparison utility such as winmerge or beyond compare... Something that performs directory as well as specific file comparisons.
Anyways, such a utility could be used to identify what else is different between the softaculous install and an install that would have been performed using an official copy of the ZC software.

I note your observation
"In my opinion you won't like the suggestion... Which would be to follow the process/guidelines of http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading"

Can you believe I did this route first of all, using a copy of 1.5.0, got it working in the subdirectory. When I replaced the 1.3.9 with files from the 1.5.0, which worked in the subdirectory, I got the problem with image enlargement which initiated this whole episode.

This is the live site as it is now, malfunctioning from the transfer from sub to public_html directory.
http://www.rarecoinsandtokens.co.uk/

If I could get this version working I would be happy.

So I have now done a complete 1.5.0 build in a subdirectory using my own 1.5.0 downloaded file installation, following that which you suggest I follow,ie http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading" which worked up to the point of moving from sub to public, and which exists with problems

I have then built another version of the site based on 1.5.3, and although Softaculous was used to ensure paths were correct etc.,(perhaps that was an issue with the first attempt).
The 1.5.3 site is actually VERY simple, has no add ons besides CKeditor, and only needs template and minor settings to display.
I cant believe Softaculous would screw that up.
http://rarecoinsandtokens.co.uk/zencart15/
This version I have advanced to password problem stage accessing admin.

Since neither of these installations is recoverable?, am I to understand that the present optimum solution, for this simple site, is another however many hours which might sort it out, by creating yet another version with another database in a subfolder based on 1.5.4 uploaded files (not softaculous), which has only just come out, and has yet to be tested by users?
My confidence is waning to the negative.
But if none come forward willing to help with the previous installations, then I have no option really.

One instruction that initially causes me concern is
"Replace all the Zen Cart php files/folders/images/everything in your live store with the new files (except the configure.php files which usually stay the same)"
That seems to be suggesting that the old 1.3.9. config files will drive the 1.5.* installation. I anticipate confusion.
In my case it would be the 1.5.0 config files which now inhabit the front end of the faulty site.
Can I clarify this issue?
Thanks.

kevin_a

1 Jan 2015, 6:37 PM
#10
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Upgrade database -- but it still shows pre-import data

So, now that you have described the process that was used to result in the faulty initial installation, the situation is quite clear....

The only upgrades that I believe I have recently seen where it is possible to simply "replace" the files has been basically 1.5.1 to 1.5.3 or (as a result of what I believe I have read about) 1.5.4. As to the "usage" of 1.5.4, it has undergone some rather extensive testing by others that do these types of things with ZC. Yes, 1.5.3 had some upgrading issues, but 1.5.3 was something of an emergency distribution as PHP 5.4 was pretty much on everyone's doorsteps... A clean install worked fine, it wasn't until later that some upgrade paths seemed to cause issues.

So, anyways, the point being that, merely writing all of the 1.5.3 files to the 1.3.9 directory is not all that is necessary, there are also files that are/were in 1.3.9 that are no longer in 1.5.3 and need to be removed... Further... template files need to be compared to the default version(s) of the files and "upgraded" as well.. They lie outside of the ZC core files, but are just as influential as any default file is. Thing is, as long as the default and/or core files are intact, then it is possible to switch templates back to the original/core templates and validate functionality of the store. If the problem continues to exist in that condition than there is something wrong with something more "basic" (core-like), and that's another time to compare the files of the store with a default (unaltered) installation.

Umm, real quick, said above that the file was found, but in the discussion also stated something about addressing the admin 'includes'... The modifications provided in that thread to address upgrading do not touch any of the admin files. In fact, when performing a database upgrade (and I learned this a couple months back) the admin directory is not even a factor in the upgrade. It can stay named as it always is/was in support of site operation. It does not require renaming or anything. So, hopefully the mod(s) were applied to either the zc_install directory or to the includes directory and not anything with the admin directory.

So, back on the 1.5.0 version of the site, if you go a step further with the comparison of the configure.php files and actually take a look at the content... You should see several lines such as define('HTTP_HOST', 'your-host-here-as-an-example');
When looking at one to the other, basically they have the same defines, correct? There are a few new ones in 1.5.x or they change slightly, for example the path to log errors changes in ZC 1.5.1... Anyways, as is stated, the things change very little in the configure.php files.. In your case the 1.5.0 configure.php file paths all include the sub-directory, where as the 1.3.x version(s) do not... And the database is different. But, all that said, the other aspects of the 1.5.0 configure.php file(s) can be brought over to the "new" location...

Does any of that make sense? I have an understanding of the process and information, but am not sure what it is that is not understood. Yes that line can be disconcerting, but when a step is taken back... For the most part it is as stated, pretty much the same... And whatever is "missing" can be added/altered after the site is confirmed to be functional.

As far as database like stuff... You could use the database credentials from either of the previous unsuccessful installs and go from there. No need to go create yet another database... Afterall in the upgrade process, technically the database gets cleared anyways to just a username, password, and database name after all the tables are dropped.. :) So really all you would do is follow the instructions of ZC 1.5.4 install (I hesitate to incorrectly state what the specific instruction is) for an upgrade from 1.5.3 (which I thought was to upload all the new files of 1.5.4 onto the existing 1.5.3 files if no changes had been made to certain files in the installation instructions), and since 1.5.4 has its own database upgrade path/instruction, then again the database from the old version can be imported, zc_install run and the database upgraded...

Remember, any files that are renamed so as not to "interfere" with changes are not to end in .php. Files in certain directories that exist with the extension .php are automatically loaded and will more than likely cause problems. Such files being changed/renamed should also not end in .old or .bak for PCI purposes.. Beyond that, only files that are necessary for site operation should remain on the server. So, if a file is temporarily renamed for testing purposes it should be removed as soon as possible.

Help? And the reason I said in my opinion you wouldn't like the suggestion was because I have seen through your several threads now the frustration that has been experienced, that also could be avoided...

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

1 Jan 2015, 11:49 PM
#11
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
142
Plugin Contributions:
0

Re: Upgrade database -- but it still shows pre-import data

Thanks for the comprehensive reply.

Whatever the post mortem, I seem to be faced with a new install using 1.5.4 files downloaded from
http://sourceforge.net/projects/zencart/?source=typ_redirect

It seems pointless persevering with a buggy but 1.5.3 “something of an emergency distribution”.
Neither will comparing the respective configure files take me forward.

“Does any of that make sense?”

Not really I’m afraid. It is neither a yes or no to using the old config files.

http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading says
Replace all the Zen Cart php files/folders/images/everything (except the configure.php files which usually stay the same)

but they are clearly not the same as you say….

“the same defines, correct? There are a few new ones in 1.5….
….or they change slightly….
In your case the 1.5.0 configure.php file paths all include the sub-directory, where as the 1.3.x version(s) do not...
And the database is different.”

seems to suggest that the old config files cannot simply be dumped in the new includes folders.
I will be missing “a few new ones or slightly changed ones etc”

I find http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading
confusing.

STEP 1
a)make a list of all your existing customizations

STEP 2
b) re-make those on the new version

so after step 1, all I have is a list. Where at this stage is this “new version” to which reference is made?
…..where is step 1a “install new version, create database etc etc”?

STEP 3
**c) upgrade the database to the new version **
The zc_install script is used to do this in an automated way.

Just a couple clicks (sic) to take care of keeping all your data intact and bringing its data structure up-to-date to work with the new version.

Further on there is the section regarding the parallel site with new database taking imported data, with the conflicting advice about
the usability of the old config files.
If there are changes, which there are, they must be necessary surely.

No, Im afraid it doesn’t entirely make sense.

“And the reason I said in my opinion you wouldn't like the suggestion was because I have seen through several threads now the frustration that has been experienced, that also could be avoided...”

At the moment I would say, given the 1.5.3 problems, and the upgrade guides/ semantics/ logic, frustration is inevitable.

I want to head for home.

I will take it on good faith that 154 is robust, and commence a fresh 154 subfolder install.
Following your advice regarding the database, I will proceed as follows.

Delete all existing 1.5.3 subfolder and contents
Create new 1.5.4 subfolder
Upload complete set of 154 files to new empty 154 subfolder
(I will not upload all the new files of 1.5.4 onto the existing 1.5.3 files)
Run zc_install
When entering database and user details, use the existing database and user details.
(Does this eliminate the need to re-run zc install, in order to upgrade database.? presuming the first install process picks up the existing database?)
I can expect 154 to create the correct paths/pwds/users for the database, store, and admin in the configure files for the subfolder?.
Rename admin
Remove zc_install
Check site front end has data included
Check log in to back end
Site should now have data but default template
Install own template
(Template has been used in 1.3.9,1.5.0,1.5.3 versions without conflict.
I will check the 6 custom files for make or break changes, but don’t expect to discover any)
Reset sideboxes and deselect sideboxes to match previous.
Check site functions vis a vis default template
Edit define pages to include existing text.
Edit main page messages and display
Edit titles and meta tags
Check functions
Delete all files from public html which currently has 1.5.0
Copy 154 from sub folder to public html
Change paths to remove subdirectory from the 1.5.4 configure files
Test.

Will this render me inelligible for support because I have not followed
http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading
and
http://www.zen-cart.com/content.php?147

precisely?

If I am headed for disaster down this route, I would appreciate advance warning!

Thank you.

kevin_a

2 Jan 2015, 2:59 AM
#12
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Upgrade database -- but it still shows pre-import data

kevin_a:

http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading says
Replace all the Zen Cart php files/folders/images/everything (except the configure.php files which usually stay the same)

but they are clearly not the same as you say….

I find http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading
confusing.

Unfortunately in reading the bullet list, the oft overlooked part of the list is the first line leading to it:

In a nutshell, an upgrade is simply this:
That sentence and the bullets that follow are not directions on how to do the upgrade, but an overview of what the upgrade is about. A concept of what is to follow, a path to go down. Yes, been there... Done that... But, once one really reads what is provided instead of "following along", then it begins to make more sense. The "instruction to come" is in the section that follows
STEP 1
a)make a list of all your existing customizations

STEP 2
b) re-make those on the new version

so after step 1, all I have is a list. Where at this stage is this “new version” to which reference is made?
…..where is step 1a “install new version, create database etc etc”?

STEP 3
**c) upgrade the database to the new version **
The zc_install script is used to do this in an automated way.

Just a couple clicks (sic) to take care of keeping all your data intact and bringing its data structure up-to-date to work with the new version.

Further on there is the section regarding the parallel site with new database taking imported data, with the conflicting advice about
the usability of the old config files.
If there are changes, which there are, they must be necessary surely.
The changes made for later versions actually make this process of upgrading and site movement easier.... The old days, everything was entered in the configure.php file. The path to the admin folder, the specific path to each subdirectory... Now, the store's location is entered (as needed) and everything else is "calculated" off of that. The admin configure.php uses self location information to identify the path of where the admin files are located. It is one reason why more often than not when an individual is working with one of the more recent versions of ZC and is asked to post their configure.php file that the request is not necessarily made to obscure the admin directory, because it doesn't exist in the newer ZC versions. It is also at least one reason why this site asks for users to identify how the current version was installed. The origin of the admin configure.php file may be back in the old days or it may have been autogenerated as is currently performed..

“And the reason I said in my opinion you wouldn't like the suggestion was because I have seen through several threads now the frustration that has been experienced, that also could be avoided...”

At the moment I would say, given the 1.5.3 problems, and the upgrade guides/ semantics/ logic, frustration is inevitable.

I want to head for home.

I will take it on good faith that 154 is robust, and commence a fresh 154 subfolder install.
There has already been one issue identified (and easily corrected) with installing ZC 1.5.4 on a system with PHP 5.2 (a no longer supported PHP version, but a workaround to allow obsolete software to be used to support upgrade/inplace installation of a new version of ZC.
Following your advice regarding the database, I will proceed as follows.

Delete all existing 1.5.3 subfolder and contents (Be easier and better to leave the two configure.php files around...)
Create new 1.5.4 subfolder
Upload complete set of 154 files to new empty 154 subfolder
(I will not upload all the new files of 1.5.4 onto the existing 1.5.3 files)
Run zc_install
When entering database and user details, use the existing database and user details. (WHICH EXISTING DATABASE AND USER DETAILS ARE YOU REFERRING TO???? My example was to use the information associated with the "failed" install(s), not the live store... Use of the live store credentials at this point if choosing something other than DATABASE UPGRADE ONLY, WILL DELETE THE LIVE STORE DATABASE....)
(Does this eliminate the need to re-run zc install, in order to upgrade database.? presuming the first install process picks up the existing database?) (NO it would not eliminate the need to run the zc_install software a second time especially because in the original rendition of this rewrite to not follow the provided guidelines there was no configure.php file on which the code has to perform the upgrade), not if
I can expect 154 to create the correct paths/pwds/users for the database, store, and admin in the configure files for the subfolder?. (The process that does this creation of files is one that basically deletes the database or populates it with demo products...)
Rename admin
Remove zc_install
Check site front end has data included
Check log in to back end
Site should now have data but default template
Install own template
(Template has been used in 1.3.9,1.5.0,1.5.3 versions without conflict.
I will check the 6 custom files for make or break changes, but don’t expect to discover any)
Reset sideboxes and deselect sideboxes to match previous.
Check site functions vis a vis default template
Edit define pages to include existing text. (IF placed in override (template) directories, there are no edit's necessary)
Edit main page messages and display (IF placed in override (template) directories, there are no edit's necessary)
Edit titles and meta tags (IF placed in override (template) directories, there are no edit's necessary)
Check functions
Delete all files from public html which currently has 1.5.0 (CAN, but during this time site response/visitation will be significantly affected)
Copy 154 from sub folder to public html
Change paths to remove subdirectory from the 1.5.4 configure files
Test.

Will this render me inelligible for support because I have not followed. NEVER inelligible for support... Some may choose not to help as a result of purposefully choosing to try to take shortcuts rather than follow the tried and true methods, which in most cases are the messages that are seen on the forum where someone has strayed from the directions unnecessarily to "make things easier".
http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading
and
http://www.zen-cart.com/content.php?147

precisely?

If I am headed for disaster down this route, I would appreciate advance warning! THERE ARE SOME THINGS IDENTIFIED ABOVE THAT WILL CAUSE YOU HEARTACHE AND MORE REWORK BECAUSE OF THE CHOICES MADE IF THEY ARE/WERE UNDERSTOOD AS IDENTIFIED ABOVE...

Thank you.

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

2 Jan 2015, 7:43 PM
#13
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
142
Plugin Contributions:
0

Re: Upgrade database -- but it still shows pre-import data

Ok. Thanks for your prompt observations again.

mc12345678:

(WHICH EXISTING DATABASE AND USER DETAILS ARE YOU REFERRING TO???? My example was to use the information associated with the "failed" install(s), not the live store... Use of the live store credentials at this point if choosing something other than DATABASE UPGRADE ONLY, WILL DELETE THE LIVE STORE DATABASE....)

I was actually referring to the database I had created for the 1.5.3 installation(millenni_zcart15)

I now have 3 database
The live store served by **millenni_db1 **
The 'floating' database which was populated with **millenni_db1 **data, and created for the 1.5.3 install, millenni_zcart15
And the database created for the install process of the 1.5.4 suite, millenni_zcart154, which 1.5.4 currently connected to.

If the install process deletes any data on the specified database, there is no way at this stage that I can incorporate a database already populated.
So I must have a blank database ready for the 154 install anyway.

So I have installed 154 on a subdirectory with an empty new database millenni_zenc154.

The virgin installation is visible.
http://www.rarecoinsandtokens.co.uk/zencart15/index.php?main_page=

I can log into admin.

I now want to develop 1.5.4 and populate it with the **millenni_db1 **data

It seems to me that if I change the 2 configs created by zc_install for the native 1.5.4 suite
as follows

// define('DB_SERVER_USERNAME', 'millenni_zenc154');
// define('DB_SERVER_PASSWORD', 'C*********4');
//define('DB_DATABASE', 'millenni_zenc154');

to
define('DB_SERVER_USERNAME', 'millenni_zenc15');
define('DB_SERVER_PASSWORD', 'S*******n');
define('DB_DATABASE', 'millenni_zenc15');

both store and admin should draw on the millenni_zenc15 created for the 1.5.3 install
but that is probably too simple and optimistic.

It works for the store (I tried it) and all categories and products show
But logging into the admin area results in
"database upgrade required. please run the 1.3.9-to-1.5.0 upgrade via zc_install".
so I guess its not that simple.
I went so far as to re-run zc_install to instruct a database upgrade, but it then rejected my admin password, returning me each time with
"password required" despite the pwd for the admin being in the text input box.

So I have reset the configs to native 1.5.4 (state before editing database 3 lines), and the site and admin are operational, but without products.

My options now seem to be..

  1. get advice on how to get 1.5.4, which currently is connected to millenni_zenc154, to access millenni_zenc15 in both store and admin areas using config edits and whatever else.
    or
  2. Import data from **millenni_db1 **into the database which 1.5.4 is connected to ie millenni_zenc154, using cPanel/mysql and... then what? reinstating zc_install, reset admin to original admin name? reset perms? and running it?

If I understood the structural relationship between the configs, the zc_install, and the databases I might get the sequence and implement it with confidence, but I have read 4 install/upgrade pages, which are themselves recursive, and it is still unclear to me.

As far as template and custom edits, I only need to install the template which is a simple one, and edit some of the metatags etc.
and edite page contents. There are only 4 or 5.
I will do that once the 1.5.4 subdirectory site is running with updated database.

I know this is not exactly what the 4 different help/upgrade pages have(each somewhat different and all recursive), but surely, I should be able to populate the 1.5.4 install with the live cart database zip?

Thank you for your help

kevin_a

3 Jan 2015, 4:47 AM
#14
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
142
Plugin Contributions:
0

Re: Upgrade database -- but it still shows pre-import data

Update on my last post.

Since I do not want to carry forward any custom edits to my 1.5.4 site, and I would rather manually change the few pages I need to change, and install a template fresh,
all I want just now is to import the live site **millenni_db1 **data base into the **millenni_zcart154 dbase for the **1.5.4 site in the sub folder..

Thats it. Nothing else. I will do any other customising as if it is a fresh site. I just want to get it running.
so I have pursued option 2 from my previous post.
And it hasnt worked.

I created an export from **millenni_db1 on **the live site today, using mysql and followed this instruction on the options.

http://www.zen-cart.com/content.php?144-how-can-i-do-a-site-backup-or-use-phpmyadmin-for-database-backup

  • Output: - Save output to a file, leave all the other settings under Output as defaults, except maybe Compression:

OPTIONAL: - zip

  • Format: - SQL
  • Format-specific options: - You ONLY need to check the "structure and data" option.
  • Object creation options: - check ALL the boxes in this section
  • Data dump options: - choose "INSERT" from the pulldown, and check the "both of the above" option. The rest of the defaults are fine.

I then imported **millenni_db1 **into the database **millenni_zcart154 **linked to my 1.5.4 site in the subfolder.

following the instructions for settings
in http://www.zen-cart.com/content.php?144-how-can-i-do-a-site-backup-or-use-phpmyadmin-for-database-backup

Open phpMyAdmin

  • From the dropdown menu, select the database you wish to restore INTO
  • Click on the "Import" tab (in older phpMyAdmin versions, you might have to click the "SQL" tab instead)
  • Click on the Browse button, and select the file you downloaded when making the backup
  • You probably want to UNCHECK the "Allow interrupt of import" in the Partial Import section.
  • Click Go

I made the 2 configs writeable, renamed 'admin154' back to 'admin', ran zc_install,

I chose upgrade database, entered user name and pwd,
ticked 4 boxes to upgrade from 1.5 through 1.54 (because the **millenni_db1is **now servinga 1.50 live site.)

and got this result

13 statements processed.
34 statements processed.
Note: 4 statements ignored. See "upgrade_exceptions" table for additional details.
16 statements processed.
6 statements processed.
Note: 1 statements ignored. See "upgrade_exceptions" table for additional details.
NOTE: Skipped upgrade statements: 5
See details at bottom of page for your inspection.
(Details also logged in the "upgrade_exceptions" table.)
Note: In most cases, these failed statements can be ignored,
as they are indications that certain settings may have already been set on your site.
If all the suggested upgrade steps have been completed (no recommendations left),
you may proceed to Skip Upgrades and continue configuring your site.

SKIPPED: Cannot ADD column status because it already exists.
SKIPPED: Cannot insert configuration_key "PADSS_ADMIN_SESSION_TIMEOUT_ENFORCED" because it already exists
SKIPPED: Cannot insert configuration_key "PADSS_PWD_EXPIRY_ENFORCED" because it already exists
SKIPPED: Cannot insert configuration_key "SHOW_CATEGORY_PRODUCTS_LINKED_STATUS" because it already exists
SKIPPED: Cannot insert configuration_key "SHOW_CATEGORY_PRODUCTS_LINKED_STATUS" because it already exists
SKIPPED: Cannot insert configuration_key "SHOW_CATEGORY_PRODUCTS_LINKED_STATUS" because it already exists
SKIPPED: Cannot insert configuration_key "SHOW_CATEGORY_PRODUCTS_LINKED_STATUS" because it already exists
SKIPPED: Cannot insert configuration_key "PADSS_AJAX_CHECKOUT" because it already exists
SKIPPED: Cannot insert configuration_key "PADSS_AJAX_CHECKOUT" because it already exists
SKIPPED: Cannot insert configuration_key "PADSS_AJAX_CHECKOUT" because it already exists
SKIPPED: Cannot insert configuration_key "PADSS_AJAX_CHECKOUT" because it already exists

I finished and closed zc_install, reset perms on configs, renamed 'admin' back to 'admin154'

The shop shows no update.
Neither database has a prefix.

Can someone please please tell me what I have done wrong..not done, because I really have tried to follow the instructions, and this protracted process at the end of another long day at it leads me to despair.

Thank you to mc12345678 for your advice so far.
If you have any further suggestions at this stage they would be appreciated.

kevin_a

3 Jan 2015, 5:24 AM
#15
drbyte avatar

drbyte

Sensei

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

Re: Upgrade database -- but it still shows pre-import data

kevin_a:

I made the 2 configs writeable, renamed 'admin154' back to 'admin', ran zc_install,

I chose upgrade database, entered user name and pwd,
ticked 4 boxes to upgrade from 1.5 through 1.54 (because the **millenni_db1is **now servinga 1.50 live site.)

and got this result

13 statements processed.
34 statements processed.
Note: 4 statements ignored. See "upgrade_exceptions" table for additional details.
16 statements processed.
6 statements processed.
Note: 1 statements ignored. See "upgrade_exceptions" table for additional details.
NOTE: Skipped upgrade statements: 5
See details at bottom of page for your inspection.
(Details also logged in the "upgrade_exceptions" table.)
Note: In most cases, these failed statements can be ignored,
as they are indications that certain settings may have already been set on your site.
If all the suggested upgrade steps have been completed (no recommendations left),
you may proceed to Skip Upgrades and continue configuring your site.Good! That shows that it went thru several versions' upgrades (ie: xxxx statements processed appears once for each of several version steps).

kevin_a:

SKIPPED: Cannot ADD column status because it already exists.
SKIPPED: Cannot insert configuration_key "PADSS_ADMIN_SESSION_TIMEOUT_ENFORCED" because it already exists
SKIPPED: Cannot insert configuration_key "PADSS_PWD_EXPIRY_ENFORCED" because it already exists
SKIPPED: Cannot insert configuration_key "SHOW_CATEGORY_PRODUCTS_LINKED_STATUS" because it already exists
SKIPPED: Cannot insert configuration_key "SHOW_CATEGORY_PRODUCTS_LINKED_STATUS" because it already exists
SKIPPED: Cannot insert configuration_key "SHOW_CATEGORY_PRODUCTS_LINKED_STATUS" because it already exists
SKIPPED: Cannot insert configuration_key "SHOW_CATEGORY_PRODUCTS_LINKED_STATUS" because it already exists
SKIPPED: Cannot insert configuration_key "PADSS_AJAX_CHECKOUT" because it already exists
SKIPPED: Cannot insert configuration_key "PADSS_AJAX_CHECKOUT" because it already exists
SKIPPED: Cannot insert configuration_key "PADSS_AJAX_CHECKOUT" because it already exists
SKIPPED: Cannot insert configuration_key "PADSS_AJAX_CHECKOUT" because it already existsI'm usually not alarmed at seeing any of this. However, it's a bit peculiar to see messages related to changes for 152 and 154 as being "already exists", but sometimes it does that.

However, since you also say:

kevin_a:

The shop shows no update.
... I'm puzzled, since the only reason for it to not show any update is if the configure.php files point to the wrong DB_XXXXX settings (that is, ALL the DB_XXXX settings).
And, since you already mention that "Neither database has a prefix." then if I take you at your word then it suggests the other DB_XXXX settings are mixed up ... and maybe your "live" site is the one that you upgraded?

Granted, your and my interpretation of "shows no update" might be completely different things.

In the hundreds of hundreds of installs and upgrades I've done any time the import didn't result in changing the data the cause was one or more of:

  • configure.php was altered by hand and things changed that didn't need to be, especially db settings
  • db_prefix was wrong, so the imported data is ignored
  • the import was actually failing but I didn't notice the error messages
  • I imported into the wrong database and didn't realize it
  • the PHP files for the core of ZC were significantly altered and were not from a fresh install
  • the imported data came from a highly customized ZC install where the database structure/data didn't resemble usual ZC data and required significant PHP changes to match the highly customized database structure

The process is pretty basic, but since your posts above suggest you like checklists, I'll restate it:
a) make a new database
b) install v1.5.4 into it, being sure to use the same DB_PREFIX in new as was in old
(this builds a new set of configure.php files containing the new database credentials as you provide them during the zc_install interview, so no further changes will be required to those files)
c) backup the old database
d) import old db into new
e) zc_install - database upgrade
Done.

.
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.

3 Jan 2015, 6:40 AM
#16
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Upgrade database -- but it still shows pre-import data

kevin_a:

Update on my last post.

Since I do not want to carry forward any custom edits to my 1.5.4 site, and I would rather manually change the few pages I need to change, and install a template fresh,
all I want just now is to import the live site **millenni_db1 **data base into the **millenni_zcart154 dbase for the **1.5.4 site in the sub folder..

Thats it. Nothing else. I will do any other customising as if it is a fresh site. I just want to get it running.
so I have pursued option 2 from my previous post.
And it hasnt worked.

I created an export from **millenni_db1 on **the live site today, using mysql and followed this instruction on the options.

http://www.zen-cart.com/content.php?144-how-can-i-do-a-site-backup-or-use-phpmyadmin-for-database-backup

  • Output: - Save output to a file, leave all the other settings under Output as defaults, except maybe Compression:

OPTIONAL: - zip

  • Format: - SQL
  • Format-specific options: - You ONLY need to check the "structure and data" option.
  • Object creation options: - check ALL the boxes in this section
  • Data dump options: - choose "INSERT" from the pulldown, and check the "both of the above" option. The rest of the defaults are fine.

I then imported **millenni_db1 **into the database **millenni_zcart154 **linked to my 1.5.4 site in the subfolder.

following the instructions for settings
in http://www.zen-cart.com/content.php?144-how-can-i-do-a-site-backup-or-use-phpmyadmin-for-database-backup

Open phpMyAdmin

  • From the dropdown menu, select the database you wish to restore INTO
  • Click on the "Import" tab (in older phpMyAdmin versions, you might have to click the "SQL" tab instead)
  • Click on the Browse button, and select the file you downloaded when making the backup
  • You probably want to UNCHECK the "Allow interrupt of import" in the Partial Import section.
  • Click Go

I made the 2 configs writeable, renamed 'admin154' back to 'admin', ran zc_install,

I chose upgrade database, entered user name and pwd,
ticked 4 boxes to upgrade from 1.5 through 1.54 (because the **millenni_db1is **now servinga 1.50 live site.)

and got this result

13 statements processed.
34 statements processed.
Note: 4 statements ignored. See "upgrade_exceptions" table for additional details.
16 statements processed.
6 statements processed.
Note: 1 statements ignored. See "upgrade_exceptions" table for additional details.
NOTE: Skipped upgrade statements: 5
See details at bottom of page for your inspection.
(Details also logged in the "upgrade_exceptions" table.)
Note: In most cases, these failed statements can be ignored,
as they are indications that certain settings may have already been set on your site.
If all the suggested upgrade steps have been completed (no recommendations left),
you may proceed to Skip Upgrades and continue configuring your site.

SKIPPED: Cannot ADD column status because it already exists.
SKIPPED: Cannot insert configuration_key "PADSS_ADMIN_SESSION_TIMEOUT_ENFORCED" because it already exists
SKIPPED: Cannot insert configuration_key "PADSS_PWD_EXPIRY_ENFORCED" because it already exists
SKIPPED: Cannot insert configuration_key "SHOW_CATEGORY_PRODUCTS_LINKED_STATUS" because it already exists
SKIPPED: Cannot insert configuration_key "SHOW_CATEGORY_PRODUCTS_LINKED_STATUS" because it already exists
SKIPPED: Cannot insert configuration_key "SHOW_CATEGORY_PRODUCTS_LINKED_STATUS" because it already exists
SKIPPED: Cannot insert configuration_key "SHOW_CATEGORY_PRODUCTS_LINKED_STATUS" because it already exists
SKIPPED: Cannot insert configuration_key "PADSS_AJAX_CHECKOUT" because it already exists
SKIPPED: Cannot insert configuration_key "PADSS_AJAX_CHECKOUT" because it already exists
SKIPPED: Cannot insert configuration_key "PADSS_AJAX_CHECKOUT" because it already exists
SKIPPED: Cannot insert configuration_key "PADSS_AJAX_CHECKOUT" because it already exists

I finished and closed zc_install, reset perms on configs, renamed 'admin' back to 'admin154'

The shop shows no update.
Neither database has a prefix.

Can someone please please tell me what I have done wrong..not done, because I really have tried to follow the instructions, and this protracted process at the end of another long day at it leads me to despair.

Thank you to mc12345678 for your advice so far.
If you have any further suggestions at this stage they would be appreciated.

DrByte:

Good! That shows that it went thru several versions' upgrades (ie: xxxx statements processed appears once for each of several version steps).

I'm usually not alarmed at seeing any of this. However, it's a bit peculiar to see messages related to changes for 152 and 154 as being "already exists", but sometimes it does that.

However, since you also say:

... I'm puzzled, since the only reason for it to not show any update is if the configure.php files point to the wrong DB_XXXXX settings (that is, ALL the DB_XXXX settings).
And, since you already mention that "Neither database has a prefix." then if I take you at your word then it suggests the other DB_XXXX settings are mixed up ... and maybe your "live" site is the one that you upgraded?

Granted, your and my interpretation of "shows no update" might be completely different things.

In the hundreds of hundreds of installs and upgrades I've done any time the import didn't result in changing the data the cause was one or more of:

  • configure.php was altered by hand and things changed that didn't need to be, especially db settings
  • db_prefix was wrong, so the imported data is ignored
  • the import was actually failing but I didn't notice the error messages
  • I imported into the wrong database and didn't realize it
  • the PHP files for the core of ZC were significantly altered and were not from a fresh install
  • the imported data came from a highly customized ZC install where the database structure/data didn't resemble usual ZC data and required significant PHP changes to match the highly customized database structure

The process is pretty basic, but since your posts above suggest you like checklists, I'll restate it:
a) make a new database
b) install v1.5.4 into it, being sure to use the same DB_PREFIX in new as was in old
(this builds a new set of configure.php files containing the new database credentials as you provide them during the zc_install interview, so no further changes will be required to those files)
c) backup the old database
d) import old db into new
e) zc_install - database upgrade
Done.

What gets me about it also, is that after the "database import" and when zc_install was run, it is said that the checkboxes had to be checked to perform the upgrade. Is it coincidence/possible that the number of statements not performed is the number of statements that should have been performed? (Ie, in the "upload" process did it really get uploaded?) A step back from that as well, though so many of the overall directions for some of the upgrade process are nearly purposefully vague, the direction for the database upgrade/copy is rather specific assuming that several "defaults" are as they may need to be. It also seems that some of the philosophy of the database process is missing. I say this because I remember there being a switch like to add a drop table if exists statement as part of the export, but it is not "covered" in the instructions provided if following them word for word...furthermore, and to in a sense advocate one of the other useful plugins on this site, I tend to use the mysql database backup utility as it seems to take care of all of that stuff.. :) download/create file, upload/copy file, restore database. That is at least in the "test" phase. Then after the file work is pretty much done, use the live database to do the upgrade on...

Btw, no need to rename the admin directory or change permissions on the configure.php files for a database only upgrade. Not to be overly sarcastic, but where's the file modifications in a database only upgrade? :P (for those not understanding the sarcasm through this written text, there is no file modifications on a database only upgrade, no need to rename the admin, no need to make configure.php files editable. In fact so long as they are not editable, the zc_install will prevent certain actions from occurring.)

As for seeing the warning about needing a database upgrade, triple, quadruple check each line of the admin and store configure.php files (again a comparison tool does this quickly and easily) there should be few differences between the two, and they should really make sense... Right now: three databases, and possibly six different configure.php files maybe more considering that the 1.3.x site was upgraded already once...

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

5 Jan 2015, 8:45 PM
#17
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
142
Plugin Contributions:
0

Re: Upgrade database -- but it still shows pre-import data

Thank you for the replies.

The process is pretty basic, but since your posts above suggest you like checklists, I'll restate it:
a) make a new database
b) install v1.5.4 into it, being sure to use the same DB_PREFIX in new as was in old
(this builds a new set of configure.php files containing the new database credentials as you provide them during the zc_install interview, so no further changes will be required to those files)
c) backup the old database
d) import old db into new
e) zc_install - database upgrade
Done.

Is the above list relevant to where i am with my installation now, or a summary of what should be done, but maybe wasnt?
I know it says the process is pretty basic, but I dont know where the process listed fits into my situation.

If it is advice on how to proceed from the current status, should I delete the millenni_zcart154, create a new database with a different name millenni_dbNewName, new password, new user, in mySQL import millenni_db_1 into millenni_dbNewName while millenni_dbNewName is selected,

Does this attempt to change the confidgs (it says so) BUT
If so, should the configure files be writable before I start the process,
I only ask because mc12345678 says

[QUOTE ]Btw, no need to rename the admin directory or change permissions on the configure.php files for a database only upgrade. Not to be overly sarcastic, but where's the file modifications in a database only upgrade? :p ([/QUOTE]

and yet zc_install
reports

  • /admin/includes/configure.php does not exist more info...
  • store configure.php is not writeable more in

So.
Does it need to be writable or not.? Does the upgrade re-write anything in the configs, or not?

As for seeing the warning about needing a database upgrade, triple, quadruple check each line of the admin and store configure.php files (again a comparison tool does this quickly and easily) there should be few differences between the two, and they should really make sense...

message after import database millenni_db1 into millenni_zcart154
Import has been successfully finished, 328 queries executed. (millenni_db1.sql.zip)

The Report in mySql for data bases extant is name/size/user

millenni_db1 |
5.23 MB millenni_dbuser2 |
[TABLE="class: sql"]

[/TD]
[TD="class: actions"][/TD]
[/TR]
[TR]
[TD]millenni_zenc15[/TD]
[TD]7.05 MB millenni_zenc15 (this was for deleted (buggy)1.5.3effort)[/TD]
[TD]

[/TD]
[TD="class: actions"][/TD]
[/TR]
[TR]
[TD]millenni_zenc154[/TD]
[TD]2.01 MB millenni_zenc154[/TD]
[TD]

[/TD]
[TD="class: actions"][/TD]
[/TR]
[/TABLE]

If I re-run zc_install, for the subfolder site, I get these messages

  • /admin/includes/configure.php does not exist more info...

  • store configure.php is not writeable more info...

  • includes/configure.php = Unwriteable

  • admin/includes/configure.php = NOT FOUND

13 statements processed.
34 statements processed.

Note: 4 statements ignored. See "upgrade_exceptions" table for additional details.
16 statements processed.
6 statements processed.
Note: 1 statements ignored. See "upgrade_exceptions" table for additional details.

I have looked at the respective config files to compare the live site using **millenni_db1 **and the subfolder site using millenni_zcart154
The following are the respective configs for live 1.5.0 site left, and subfolder1.5.4 right

ADMIN includes
//150 admin/includes <?php /** folder * @package Configuration Settings circa 1.5.0 * @copyright Copyright 2003-2011 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * File Built by zc_install on 2014-11-15 05:28:02 / /************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. / /**** The 2 files should be kept separate and not used to overwrite each other. ********/ / * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN: * To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries: / define('HTTP_SERVER', 'https://enterprise.terrassl.net'); define('HTTPS_SERVER', 'https://enterprise.terrassl.net'); define('HTTP_CATALOG_SERVER', 'http://www.rarecoinsandtokens.co.uk'); define('HTTPS_CATALOG_SERVER', 'https://enterprise.terrassl.net'); // secure webserver for admin? Valid choices are 'true' or 'false' (including quotes). define('ENABLE_SSL_ADMIN', 'false'); // secure webserver for storefront? Valid choices are 'true' or 'false' (including quotes). define('ENABLE_SSL_CATALOG', 'false'); // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes! // * DIR_WS_ = Webserver directories (virtual/URL) // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder) $t1 = parse_url(HTTP_SERVER);$p1 = $t1['path'];$t2 = parse_url(HTTPS_SERVER);$p2 = $t2['path']; //define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/'); define('DIR_WS_ADMIN', '/~millenni/adminnewzen2/'); //define('DIR_WS_CATALOG', '/rarecoinslocal/'); define('DIR_WS_CATALOG', '/~millenni/'); //define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '-', $p2) . '#', '', dirname($SERVER['SCRIPT_NAME'])) . '/'); define('DIR_WS_HTTPS_ADMIN', '/~millenni/adminnewzen2/'); //define('DIR_WS_HTTPS_CATALOG', '/rarecoinslocal/'); define('DIR_WS_HTTPS_CATALOG', '/~millenni/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/'); define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/'); // * DIR_FS = Filesystem directories (local/physical) define('DIR_FS_ADMIN', realpath(dirname(FILE) . '/../') . '/'); //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/ //define('DIR_FS_CATALOG', 'C:/wamp/www/rarecoinslocal/newzen2/'); define('DIR_FS_CATALOG', '/home/millenni/public_html/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); // define our database connection define('DB_TYPE', 'mysql'); define('DB_PREFIX', ''); define('DB_CHARSET', 'utf8'); define('DB_SERVER', 'localhost'); // define('DB_SERVER_USERNAME', 'root'); // define('DB_SERVER_PASSWORD', 'password'); define('DB_SERVER_USERNAME', 'millenni_dbuser2'); define('DB_SERVER_PASSWORD', 'e************v'); define('DB_DATABASE', 'millenni_db1'); // The next 2 "defines" are for SQL cache support. // For SQL_CACHE_METHOD, you can select from: none, database, or file // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder // ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash define('SQL_CACHE_METHOD', 'none'); define('DIR_FS_SQL_CACHE', '/home/millenni/public_html/cache'); // Define the webserver and path parameters // Main webserver: eg-http://www.your_domain.com - // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.your_domain.com / * URLs for your site will be built via: * HTTP_SERVER plus DIR_WS_ADMIN or * HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or * HTTP_SERVER plus DIR_WS_CATALOG or * HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG * ...depending on your system configuration settings */ // EOF //154 admin includes (native installation no edits..NOT UPDATING not working to update) <?php /** * @package Configuration Settings circa 1.5.4 * @copyright Copyright 2003-2014 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * File Built by zc_install on 2015-01-02 05:20:25 / /************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. / /**** The 2 files should be kept separate and not used to overwrite each other. */ / * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN: * To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries: / define('HTTP_SERVER', 'http://www.rarecoinsandtokens.co.uk'); define('HTTPS_SERVER', 'https://www.rarecoinsandtokens.co.uk'); define('HTTP_CATALOG_SERVER', 'http://www.rarecoinsandtokens.co.uk'); define('HTTPS_CATALOG_SERVER', 'https://www.rarecoinsandtokens.co.uk'); // secure webserver for admin? Valid choices are 'true' or 'false' (including quotes). define('ENABLE_SSL_ADMIN', 'false'); // secure webserver for storefront? Valid choices are 'true' or 'false' (including quotes). define('ENABLE_SSL_CATALOG', 'false'); define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '-', zen_parse_url(HTTP_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/'); define('DIR_WS_CATALOG', '/zencart15/'); define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '-', zen_parse_url(HTTPS_SERVER, '/path')) . '#', '', dirname($SERVER['SCRIPT_NAME'])) . '/'); define('DIR_WS_HTTPS_CATALOG', '/zencart15/'); // NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes! // * DIR_WS = Webserver directories (virtual/URL) // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder) define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/'); define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/'); // * DIR_FS_ = Filesystem directories (local/physical) define('DIR_FS_ADMIN', preg_replace('#.includes$#', '', realpath(dirname(FILE) . '/../') . '/')); //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/ define('DIR_FS_CATALOG', '/home/millenni/public_html/zencart15/'); //the following path is a COMPLETE path to the /logs/ folder eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash define('DIR_FS_LOGS', '/home/millenni/public_html/zencart15/logs'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); // define our database connection define('DB_TYPE', 'mysql'); define('DB_PREFIX', ''); define('DB_CHARSET', 'utf8'); define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'millenni_zenc154'); define('DB_SERVER_PASSWORD', 'C4'); define('DB_DATABASE', 'millenni_zenc154'); // The next 2 "defines" are for SQL cache support. // For SQL_CACHE_METHOD, you can select from: none, database, or file // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder // ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash define('SQL_CACHE_METHOD', 'none'); define('DIR_FS_SQL_CACHE', '/home/millenni/public_html/zencart15/cache'); // Define the webserver and path parameters // Main webserver: eg-http://www.your_domain.com - // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.your_domain.com / * URLs for your site will be built via: * HTTP_SERVER plus DIR_WS_ADMIN or * HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or * HTTP_SERVER plus DIR_WS_CATALOG or * HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG * ...depending on your system configuration settings */ // EOF

the imported data came from a highly customized ZC install where the database structure/data didn't resemble usual ZC data and required significant PHP changes to match the highly customized database structure
What does 'highly' and 'significant' mean. The live site has Image Handler4 on it, the subfolder 1.5.4 doesnt. Is that high and significant?
Im sure the two 'resemble' each other.

If it is not high and significant, will the import just create tables for IH4, which then become usable if IH4 is subsequently installed in the subfolder 1.5.4 site?, but otherwise not be a significant?

Finally, what am I supposed to make of this instruction? during the zc_install process?

A - configure.php - If you are using v1.5, go to step B.
If you are using v1.3.x, see the next section below which explains how to edit this file properly.

There is no need to alter the admin configure.php in v1.5.x when renaming your admin folder. Simply proceed to step B.
B - Rename the Admin folder

Using your FTP software or your webhost's File Manager, find your Zen Cart /admin/ directory*. *Rename the directory to match the settings you just made in step A.

Well, I seem to be "using" (what does "using" mean exactly? is it the source database?, the target database?) 1.50, so I go to straight to step B, which promptly tells me to rename the directory I "just made in step A", the step I was told to bypass.

Still rather confused, and its hard to create a comprehensible understanding of quite what goes on in all of this so that I can gain independence when managing my installation. because, with respect, the default instructions (there are 4 different installation/upgrade pages I am supposed to refer to,

HOW DO I INSTALL ZEN CART?
http://www.zen-cart.com/content.php?147

TWO
HOW DO I UPGRADE MY SITE?
http://www.zen-cart.com/content.php?140

THREE
HOW DO I UPGRADE MY ZEN CART SITE?
3 EASY STEPS TO UPGRADE ZEN CART
http://www.zen-cart.com/content.php?148

FOUR
HOW DO I REBUILD MY SITE ON THE NEW VERSION, INSTEAD OF UPGRADING?
http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading

cross reference each other and in some cases contradict each other.)

but perhaps the above will help to inch towards a solution?

Thanks

kevin_a

6 Jan 2015, 4:20 AM
#18
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Upgrade database -- but it still shows pre-import data

  1. A database upgrade only does not write to the configure.php files...
  2. A database upgrade only does not read the admin/includes/configure.php file therefore, the above comparisons do not alleviate nor answer the issue about why this database upgrade remains incomplete.
  3. Part of the reason that it is suggested to perform a rebuild when upgrading from pre 1.5 is the way that the admin/includes/configure.php now self identifies its location and therefore movement of the admin directory in a standard/vanilla ZC install does not require anything other than renaming the admin directory to continue being able to access the admin directory. If the admin/includes/configure.php file still has the "old" method of assigning the location of the folders of the admin directory, then it can be updated to the new version/method, or it can remain the same. So, in regards to going to step B and skipping the substep of step A is meant that the contents of the admin/includes/configure.php file do not need to be modified to support moving the admin directory. Otherwise, the substep in step A advises to change the contents of the admin/includes/configure.php file.
  4. The notification that the configure.php files are not writeable is merely that... A notification... It neither implies something is wrong nor that everything is right... The database upgrade merely needs to be able to read/know the information to access the database. That information is conveniently located (or should be) in the includes/configure.php file... This leads to:
  5. The pointer(s) to the database, which ever is being upgraded, need to tie to the data that is expected to be updated. First there is a server (DB_SERVER) that has one or more databases (DB_DATABASE), each database is associated/identified by its own DB_DATABASE setting, although two stores can share the same DB_DATABASE... But let's continue. Then there is who is allowed to access the database and what information they need to provide to access it (DB_SERVER_USERNAME and DB_SERVER_PASSWORD), these also can be the same across database's however is discouraged for security reasons. Then to cut to the chase, there is the database prefix (DB_PREFIX)... As properly written ZC code accesses the database, this value is prepended to whatever table is being accessed... So when trying to read or write to the "configuration" table, if the DB_PREFIX were 'zen_' then the table that would be accessed would be zen_configuration. If when comparing the includes/configure.php files of the old and new databases the DB_PREFIX is different, then the new store doesn't have a connection to the imported old tables. This would also explain why the size of the "new" database appears to be the sum of each database from the old store and a new store...

So... Please, what are the contents of your includes/configure.php files in both stores, without providing the DB_SERVER_USERNAME, DB_SERVER_PASSWORD, and possibly not the DB_SERVER (though it looks like localhost is the value for that). Seeing that you have been able to navigate phpmyadmin to review database content, then perhaps you have already navigated the list of tables and seen that there are perhaps in some context duplicate tablenames... If they are not the same, then that would explain why none of the data is displayed on the new site from the old site. Once that is resolved, then the remaining issues can be addressed. It would make it much easier to diagnose this issue to have the information that is at this point considered central to the cause of the issue...

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