Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32
  1. #1
    Join Date
    Mar 2015
    Posts
    7
    Plugin Contributions
    0

    Default Crazy/dangerous idea... Problems with upgrading

    Quick back story... 4-5 years ago I set up zencart. It's been very stable and I never had a single problem (thanks zencart team for making an awesome product!!). I didn't do any updates from the original v1.3.9h installation because I modified the master template files so much (I know... bad idea). And I don't have the time to constantly be patching and experimenting with the store.

    I decided to update today to v1.5.4 and realized it would be better to just start from scratch. Except I'd love to use the old mysql database. I've done a significant amount of reading about the process and I was going to follow these steps posted by another user.

    I backed up the original database using the export tool from phpmyadmin. I setup the new store in a directory off the root directory like the instructions in the other link mentioned. I walked through the setup, created a new database with my cpanel and linked it accordingly through the installer. But I believe I have hit a major stumbling block. The new v1.5.4 store is online and live in the temporary directory with a blank database but I've tried numerous times to use the import feature from phpmyadmin and it doesn't seem to actually import any of the old tables. It always says executed 391 queries. but the new database doesn't have any of the old data in it.

    I've tried installing and using the sample database and importing the old database into the sample database but that didn't work...
    I've tried installing and not using the original prefix from the original database but that didn't work.
    I've tried installing and using the original prefix but that didn't work.

    Here is the crazy question... Would it work, if I followed the link above and changed the configure.php files in v1.5.4 installation to reflect the old database credentials? I believe I would have to re-run the zc_install and do database only option after I changed the configure.php files no?

    I want to upgrade to 1.5.4 but it seems I only have one working copy of the original database and I don't want to mess it up. Thoughts? I haven't played with the store in several years and I don't have a lot of time to constantly be messing with this stuff... I'm just worried about losing the products and customer info from the old database.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Crazy/dangerous idea... Problems with upgrading

    Would suggest exporting your original database again, choose the option to include the delete table options or similar such option.

    You are doing things properly; however, in the new database, need to properly clear the database by dropping the tables (new database only at this point) before uploading the old database back into it.

    DO NOT CUT CORNERS with those directions. At this stage if you update your database without fully going through the update, you will more than likely disable your current site...

    Take the time to get through, unless you have no need to do business... I haven't even looked at the included link yet, but will tell you, don't cut any corners...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Crazy/dangerous idea... Problems with upgrading

    As your new test store is working (minus the old customers / orders etc) there is no need to fiddle with the configure.php files which were created during the install process. Leave their permissions at 444 or 400 so they can't be overwritten.

    Now you head to your phpMyAdmin and select the newly created DB. Then you drop all tables from that DB leaving you with an empty DB. Then you import the old 1.3.9h DB into the newly created 1.5.4 DB

    Next you upload the zc_install folder to your test folder (new store) and run yoursite.com/teststore/zc_install

    On the bottom of that install screen you see a button (Database Update). Hit that button but NOT the install button. Follow the prompts and don't worry about the warnings about configure.php files not being writable - you only update the DB, nothing else.

    When done you delete the zc-install folder from your your test store.

    And that should be it.

    Let us know how things are progressing

  4. #4
    Join Date
    Mar 2015
    Posts
    7
    Plugin Contributions
    0

    Default Re: Crazy/dangerous idea... Problems with upgrading

    The original database that v1.5.4 created did have all the tables but obviously this was blank because I chose not to create a sample database of products. When I tried importing the original database into the new tables it said it completed 391 queries but no new data was entered (ie, none of my customers and products etc etc where imported into the tables).

    This morning, I wanted to see if it was at least making the tables into the new database. So I deleted the new database with cPanel, re-created a new database with same name and user access. When I went into myphpadmin it had the name of the new database but no tables/entries under the database name... which is what I wanted.

    I selected the import option when having the new database name highlighted, it took a minute to run it's course, but when it said it was completed 391 queries again, the new database is completely blank. I believe the issue I face is the import function doesn't seem to be working. There is none of the old data in the new database nor was the import function able to even create the tables and I am not sure why.

    I am using the following options

    - file to import, filename.sql (removed actual file name for security reasons), character set = utf-8
    - partial import, unchecked partial import.
    - format, format = sql
    - format-specific options, sql compatibility mode=none, checked "Do not use auto_increment for zero values"

    I believe I am left with two options.

    1) fix the import function
    2) copy the new /includes and /admin/includes to the old store, edit the configure.php's to use the old database credentials, run the zc_install and select "upgrade database only" options...

    While I could copy all of my old store into a demo directory, patch the demo directory to see if it works, the part that scares me is using what seems to be the only good copy of the database I have...

  5. #5
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Crazy/dangerous idea... Problems with upgrading

    Quote Originally Posted by mallabik View Post
    The original database that v1.5.4 created did have all the tables but obviously this was blank because I chose not to create a sample database of products. When I tried importing the original database into the new tables it said it completed 391 queries but no new data was entered (ie, none of my customers and products etc etc where imported into the tables).

    This morning, I wanted to see if it was at least making the tables into the new database. So I deleted the new database with cPanel, re-created a new database with same name and user access. When I went into myphpadmin it had the name of the new database but no tables/entries under the database name... which is what I wanted.

    I selected the import option when having the new database name highlighted, it took a minute to run it's course, but when it said it was completed 391 queries again, the new database is completely blank. I believe the issue I face is the import function doesn't seem to be working. There is none of the old data in the new database nor was the import function able to even create the tables and I am not sure why.

    I am using the following options

    - file to import, filename.sql (removed actual file name for security reasons), character set = utf-8
    - partial import, unchecked partial import.
    - format, format = sql
    - format-specific options, sql compatibility mode=none, checked "Do not use auto_increment for zero values"

    I believe I am left with two options.

    1) fix the import function
    2) copy the new /includes and /admin/includes to the old store, edit the configure.php's to use the old database credentials, run the zc_install and select "upgrade database only" options...

    While I could copy all of my old store into a demo directory, patch the demo directory to see if it works, the part that scares me is using what seems to be the only good copy of the database I have...
    Have you tried looking at the content of your renamed filename.sql file using a basic text editor? (Not Wordpad or anything that would/could inject alternate characters) Does the import file include the data for which you are looking or is it basically a series of tables itself? Also the import file may have reference/requirement to your old database and seeing the discrepancy of database names may still "process" the file but see that the file should not be applied to your current "new" database. Again, inspection by a text editor would be suggested, possibly make a backup of the file, open and edit it to point to your new database and credentials, save the changes and then try to import it into a completely blank database (seems like your new database fits that condition at this time having no tables in it).
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Crazy/dangerous idea... Problems with upgrading

    Clearly something's not working correctly with the import. It could be something wrong with how you originally exported. Or a number of things.

    But another option that might work (since you're using the same server for both the live and test sites) is to use phpMyAdmin to do the copy of the live database to another database already in your server. Whether this will work depends on the cofniguration of phpMyAdmin and server security restrictions.
    What I've done before is:
    - click on the "live" database, on the left column.
    - Then in the right column click on the Operations tab.
    - On that screen I have a "Copy Database To..." option, where I can enter the name of the database I want to copy everything over to ... plus some checkboxes:
    -- Check the "Copy structure and data" box.
    -- Uncheck the "Create database" (because you already have the database, and security rules on shared servers usually prevent you from creating db's with phpMyAdmin)
    -- Check the Drop Tables/Views (so that it removes any same-named tables in the new db)
    -- Keep the Auto-Increment checked
    -- constraints are probably irrelevant
    The "switch to copied db" option simply tells phpMyAdmin to switch its screens to the new db after the copy is done. So, might be handy to "check" this box.
    .

    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.

  7. #7
    Join Date
    Mar 2015
    Posts
    7
    Plugin Contributions
    0

    Default Re: Crazy/dangerous idea... Problems with upgrading

    Thanks for the quick responses everyone, really appreciate that.

    To start off, the exported file is the same size as database listed on the cpanel. Yesterday through my hours of reading, I read that the .sql file would be a file with a ton of text that doesn't make much sense to humans but is in plain text that can be parsed and put back into tables.Yesterday, I looked into that file because I was curious and it is readable text and there is a lot of it, about 7 MB of data... so I hope it was exported fine.

    I followed the steps outlined by DrByte in one of the many posts I read about the database procedure. I just can't find the link as I type this message out.

    I will try to use the copy function, but I will have to try the "create database" option because I deleted the v1.5.4 database to test the import function.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Crazy/dangerous idea... Problems with upgrading

    Quote Originally Posted by mallabik View Post
    ..., but I will have to try the "create database" option because I deleted the v1.5.4 database to test the import function.
    You can re-create the test database the same way you did previously using your hosting service control panel.
    .

    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.

  9. #9
    Join Date
    Mar 2015
    Posts
    7
    Plugin Contributions
    0

    Default Re: Crazy/dangerous idea... Problems with upgrading

    A couple of observations from the last few days.

    The copy database feature from the myphpadmin worked in duplicating the "live" (old 1.3.9h) database to the "demo" (1.5.4) database. (I deleted the original 1.5.4 store database so it didn't have any tables to get confused with). I did notice that when I copied the zc_install directory onto the demo file structure and tried to run the "update database" only button it kept asking for the admin password which is were I ran into issues.

    The newly created "demo" (1.5.4) admin password did not work. I tried it many times and actually deleted and re-installed the demo site and process twice in case I was getting the password wrong. I then realized that it may have been asking for the old admin password because I copied the old database over to the new 1.5.4 database.

    I tried the old admin password and sure enough it worked. I did get a couple of errors I am hoping aren't a huge ideal and they won't impact the process.

    SKIPPED: Cannot drop index page_accessed on table admin_activity_log because it does not exist.
    SKIPPED: Cannot drop index access_date on table admin_activity_log because it does not exist.
    SKIPPED: Cannot add index idx_page_accessed_zen to table admin_activity_log because it already exists.
    SKIPPED: Cannot add index idx_access_date_zen to table admin_activity_log because it already exists.

    I'm going to take everyone's advice this time and *not* mess with the master template and just install template found in the download section of this site. Once I have the new template working to my liking I have one and final question...

    I read in several threads that if I rename the old store /includes and /admin/includes to includes_139 and /admin/includes_139 copy the demo /includes and /admin/includes to the root of the store (in theory moving the demo store to the live store). I should have a working copy of the new store from the old store location? Correct?

    The reason why I ask, I noticed none of the product images were working because the paths in the database are off by one level. I'm just hoping that moving the new template /includes and /admin/includes doesn't mess anything else.

    I will have to re-configure the paypal module, but that's expected with any 1.5.4 installation.

  10. #10
    Join Date
    Jul 2012
    Posts
    16,817
    Plugin Contributions
    17

    Default Re: Crazy/dangerous idea... Problems with upgrading

    Quote Originally Posted by mallabik View Post
    I tried the old admin password and sure enough it worked. I did get a couple of errors I am hoping aren't a huge ideal and they won't impact the process.

    SKIPPED: Cannot drop index page_accessed on table admin_activity_log because it does not exist.
    SKIPPED: Cannot drop index access_date on table admin_activity_log because it does not exist.
    SKIPPED: Cannot add index idx_page_accessed_zen to table admin_activity_log because it already exists.
    SKIPPED: Cannot add index idx_access_date_zen to table admin_activity_log because it already exists.

    I'm going to take everyone's advice this time and *not* mess with the master template and just install template found in the download section of this site. Once I have the new template working to my liking I have one and final question...

    I read in several threads that if I rename the old store /includes and /admin/includes to includes_139 and /admin/includes_139 copy the demo /includes and /admin/includes to the root of the store (in theory moving the demo store to the live store). I should have a working copy of the new store from the old store location? Correct?

    The reason why I ask, I noticed none of the product images were working because the paths in the database are off by one level. I'm just hoping that moving the new template /includes and /admin/includes doesn't mess anything else.

    I will have to re-configure the paypal module, but that's expected with any 1.5.4 installation.
    Username and password is tied to the database, old database, old credentials. Glad you figured that out.

    Those messages are not errors. They provide information about what action(s) were attempted but not performed.

    Yes, ideally leave the classic directory and template_default directory as they are. It will certainly make things easier in the future.

    I believe I saw the same suggestion about moving the store(s), but I would think that the admin directory should be the one renamed not the includes folder inside of it. (There are other folders inside the admin directory besides the includes folder.)

    As to the image offset, the database locations are based off of the DIR_WS_IMAGES constant defined in the includes/configure.php file. So if your previous structure was images/images/imagefile.jpg then that same structure would be expected to exist in the new store. The database would reflect images/imagefile.jpg most likely, but could also reflect just imagefile.jpg if the depending on the define of the applicable configure.php file.

    So in short with that, moving the store will not resolve that issue and in fact should be resolved before moving the store. Otherwise how will you know what caused the problem?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. v151 Problems with sqlpatch.php after upgrading to v151
    By elvisstuff in forum General Questions
    Replies: 3
    Last Post: 27 Sep 2012, 02:54 PM
  2. Problems with product details after upgrading to 1.3.9d
    By tonyb in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 3 Aug 2010, 02:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg