Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 27
  1. #11
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: 156a db upgrade does not fix all incorrect datetime values

    Quote Originally Posted by DrByte View Post
    Wanna try running this cleanup?
    (ie: run it manually before running zc_install, or insert it into the zc_install mysql_upgrade_zencart_YYY.sql file where YYY is the "next" zc version after the one your database data is from)
    Thanks DrByte,
    Zero logfile errors.

    drop tables
    import db from backup
    run cleanup from within phpMyAdmin
    run zc_install as update
    no logfiles generated

    when I inserted the code at line 252 of mysql_upgrade_zencart_155.sql
    and ran the zc_install as update, there were 2 error files generated.

    That's when I just started over and ran the cleanup from within phpMyAdmin.
    Didn't look to see what/if I fouled up in my paste/save to the mysql_upgrade_zencart_155.sql
    Probably overlooked an overzealous mouse grab in the copy/paste.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  2. #12
    Join Date
    Sep 2011
    Posts
    47
    Plugin Contributions
    0

    Default Re: 156a db upgrade does not fix all incorrect datetime values

    Okay just tried this on my issues.....right now iam able to put the store down for maintenance and all my items are there just gonna keep testing looking around and see so it is prob. worth putting somewhere in the 1.5.6a sql db update file

    Robert

    Thank you very much

  3. #13
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,691
    Plugin Contributions
    9

    Default Re: 156a db upgrade does not fix all incorrect datetime values

    ok, i love sql.... to a point...

    my experience and tests. first off, when i get to here:

    /index.php?main_page=database_upgrade

    and it asks to confirm the steps to upgrade, should there a button to confirm? or does one just press enter? i have not looked to much further into what is on that page, as i am getting caught up into the db upgrade. but if there is supposed to be a button, then something is wrong on my browser, if there is no confirmation button, i think we should add one.

    i have tried modifying this file:

    zc_install/sql/updates/mysql_upgrade_zencart_156.sql

    to include all of the db fixes above; i was not able to get it to work. however, if i manually ran everything prior to doing the upgrade it worked fine.

    that said, do we need to look at standardizing all our datetimes? or is it bound to create more confusion? for example, in the code above:

    Code:
    UPDATE products
    SET products_date_added = '0001-01-01 00:00:00'
    WHERE products_date_added < '0001-01-01'
      and products_date_added is not null;
    UPDATE products
    SET products_last_modified = NULL
    WHERE products_last_modified < '0001-01-01'
      and products_last_modified is not null;
    this is caused by the structure:

    products_date_added datetime [0001-01-01 00:00:00]
    products_last_modified datetime NULL
    products_date_available datetime NULL

    not sure if the effort is worth it or not. or if there is a reason why the schema is different.

    finally i LOVE the link that @design75 added. thank you. i have not played around with it yet. but i will! as i said above, i love sql... to a point...

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  4. #14
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 156a db upgrade does not fix all incorrect datetime values

    Quote Originally Posted by carlwhat View Post
    and it asks to confirm the steps to upgrade, should there a button to confirm?
    Yes, there's a button to click to proceed with applying the updates required.

    Quote Originally Posted by carlwhat View Post
    that said, do we need to look at standardizing all our datetimes? or is it bound to create more confusion?
    That's a completely separate topic. It requires changing how the PHP code interacts with the data.
    Maybe for v2.
    .

    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.

  5. #15
    Join Date
    May 2007
    Location
    Brighton/Hove/Sussex
    Posts
    144
    Plugin Contributions
    0

    Default Re: 156a db upgrade does not fix all incorrect datetime values

    Quote Originally Posted by DrByte View Post
    Wanna try running this cleanup?
    (ie: run it manually before running zc_install,
    All the above thread is way above my head, my weakest skill point, fiddling with MySql
    So do I put the copy paste from that post at myphpadmin into the database there?
    Does it therefore sort out the date issues before possibly failing on a install.php run.

    This will be my fourth run, three times install.php with 156, now with 156a since 27/12/18, which filezilla is doing right now.
    Original store was 1.39:- TransportPostcards.co.uk/shop (redirecting out)
    Working on a fresh new store... 1.56a TransportPostcards.co.uk/store
    Appreciate Zen-Cart? - Always keep a banner link on your shop

  6. #16
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 156a db upgrade does not fix all incorrect datetime values

    @Dinnages,
    In one of your other posts I saw that you are using a non-blank db table-prefix (yours is "zen_"), so that means you can't just copy/paste the above SQL into phpMyAdmin. You'd need to modify all the table names.

    However, if you have access to your old live store's admin, you could paste it into Admin->Tools->SqlPatches and run it there. Then take a new backup of your db and use that for testing your upgrade.

    Or, you could fiddle with the text above and change every "UPDATE foo SET" to "UPDATE zen_foo SET" at the beginning of each line, where "foo" is the tablename that's already there in the text above. You're just adding "zen_" to each one.
    .

    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. #17
    Join Date
    May 2007
    Location
    Brighton/Hove/Sussex
    Posts
    144
    Plugin Contributions
    0

    Default Re: 156a db upgrade does not fix all incorrect datetime values

    Thank you DrByte for that, wasnt going ahead until I could see which way to go next.

    The zen_ prefix has been there since the first ever cart I installed, I would not have been aware of adding that personally, & I would always go by dafult options.

    I dont think its wise for me to play with 1.39 as the PHP seemed to get the shop confused, the data kept getting lost when I edited products and things before I moved the PHP up to 7.1 for Wordpress, & now for 1.56 and anyway, I would like not to mess the #2 database, I have only been using copies of that as in #3 #3a etc. So I have had a backup all along.


    UPDATE admin SET pwd_last_change_date = '0001-01-01 00:00:00' WHERE pwd_last_change_date < '0001-01-01' and pwd_last_change_date is not null;

    You mean

    UPDATE zen_admin SET



    My own post on the upgrade 139 - 156/156a progress for others is here
    https://www.zen-cart.com/showthread....issing-options
    Original store was 1.39:- TransportPostcards.co.uk/shop (redirecting out)
    Working on a fresh new store... 1.56a TransportPostcards.co.uk/store
    Appreciate Zen-Cart? - Always keep a banner link on your shop

  8. #18
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 156a db upgrade does not fix all incorrect datetime values

    UPDATE admin SET pwd_last_change_date = '0001-01-01 00:00:00' WHERE pwd_last_change_date < '0001-01-01' and pwd_last_change_date is not null;

    would become:

    UPDATE zen_admin SET pwd_last_change_date = '0001-01-01 00:00:00' WHERE pwd_last_change_date < '0001-01-01' and pwd_last_change_date is not null;

    Just the one change.

    Then wash, rinse, repeat, for each line.

    Then run in phpMyAdmin.
    .

    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. #19
    Join Date
    May 2007
    Location
    Brighton/Hove/Sussex
    Posts
    144
    Plugin Contributions
    0

    Default Re: 156a db upgrade does not fix all incorrect datetime values

    Quote Originally Posted by DrByte View Post
    UPDATE admin SET pwd_last_change_date = '0001-01-01 00:00:00' WHERE pwd_last_change_date < '0001-01-01' and pwd_last_change_date is not null;

    would become:

    UPDATE zen_admin SET pwd_last_change_date = '0001-01-01 00:00:00' WHERE pwd_last_change_date < '0001-01-01' and pwd_last_change_date is not null;

    Just the one change.

    Then wash, rinse, repeat, for each line.

    Then run in phpMyAdmin.
    Ha I LOL on your methodology for explaining in very simple terms, what many might see, but others like me do not, and it is best to ask to be sure what we do with things like this then go semi-blindly ahead and mess up a perfectly good database and have to start all over again.
    So looks like its only at the start of each line.

    Will try that edit soon, by copying the code to a notepad and go from there, etc. Could be there soon :-)
    Never made much out of sales but its a long term thing.
    Original store was 1.39:- TransportPostcards.co.uk/shop (redirecting out)
    Working on a fresh new store... 1.56a TransportPostcards.co.uk/store
    Appreciate Zen-Cart? - Always keep a banner link on your shop

  10. #20
    Join Date
    May 2007
    Location
    Brighton/Hove/Sussex
    Posts
    144
    Plugin Contributions
    0

    Default Re: 156a db upgrade does not fix all incorrect datetime values

    Well have my amended file, ready to copy and paste into the second tab which states Run SQL query...
    However right click does not allow a paste option, only forward/back page arrows, "Save Page as" etc.

    Or am I in the wrong place?

    Code:
    UPDATE zen_admin SET pwd_last_change_date...
    Original store was 1.39:- TransportPostcards.co.uk/shop (redirecting out)
    Working on a fresh new store... 1.56a TransportPostcards.co.uk/store
    Appreciate Zen-Cart? - Always keep a banner link on your shop

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Replies: 6
    Last Post: 2 Dec 2017, 11:10 PM
  2. Replies: 5
    Last Post: 10 Jan 2017, 01:24 AM
  3. PayPal IPN - 1292 Incorrect datetime value
    By Alex Clarke in forum Upgrading from 1.3.x to 1.3.9
    Replies: 20
    Last Post: 12 Oct 2009, 05:48 PM
  4. PayPal error: 1292 Incorrect datetime value: '00:13:47 09 2008' for column
    By directprint in forum PayPal Express Checkout support
    Replies: 2
    Last Post: 11 Jul 2008, 08:47 AM
  5. Replies: 3
    Last Post: 1 Aug 2007, 04:39 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR