Results 1 to 4 of 4

Hybrid View

  1. #1

    Default 1062 Duplicate entry '0' for key 1

    New at Zen-Cart. Client just signed up with us and needs cart transferred.

    Moved ZC from Linux server to FreeBSD server, no more access to old server. Did full export of database **.sql and imported it under the same name at new location. Copied directories.

    Access to site successful.
    Access to admin successful.
    Turned off maintenance mode, success.
    Logged in as user (to store) success.
    Add item to cart: Error
    - 1062 Duplicate entry '0' for key 1
    - If I reload/refresh the page, it shows me the shopping cart with two of the item.
    - Also, cart has item before added item (no pic/no name) 0 Min: Units: *Mixed ON $0.00
    ===
    While logged out:
    Add item to cart, success
    Check out -> ask for login
    Login, error:
    - 1062 Duplicate entry '0' for key 1
    - Reload/refresh duplicates page
    - If I manually go back to ZC directory on webpage, can view cart with merged item.
    ===

    Ideas?

    Other people mentioned an admin_activity_log table in DB. I don't have this table. If this is needed, please post SQL commands with column data. Thanks.

    ====
    MySQL: mysql Ver 12.22 Distrib 4.0.26, for portbld-freebsd5.2.1 (i386)
    PHP: Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    ZC: 1.2.4.1 (w/patch) (I think!)
    ====

    Regards,
    Marc

  2. #2

    Default Re: 1062 Duplicate entry '0' for key 1

    Also, as a troubleshooting step, I thought that I could upgrade to the latest ZC.

    Downloaded 1.3 and ran upgrade. One (red-X) error with open_basedir.
    Clicked Upgrade button and got screen:

    1062 Duplicate entry '0' for key 1
    in:
    [INSERT INTO zen_configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('IP to Host Conversion Status', 'SESSION_IP_TO_HOST_ADDRESS', 'true', 'Convert IP Address to Host Address

    Note: on some servers this can slow down the initial start of a session or execution of Emails', '15', '10', 'zen_cfg_select_option(array(\'true\', \'false\'), ', now());]
    --Marc

  3. #3
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default Re: 1062 Duplicate entry '0' for key 1

    I ran into this issue...

    make sure that all the tables have the auto increment inthem...

    I just had to go through and manually update the entire db for this issue
    Zen cart PCI compliant Hosting

  4. #4

    Default Re: 1062 Duplicate entry '0' for key 1

    Merlin,

    Thanks for the assist. I wasn't sure if this was the case because I do not have several of the tables listed in other counter threads. But, your answer worked. Thank you!

    Here's what I copied and pasted into my SQL command interpreter:

    http://www.zen-cart.com/forum/showpo...1&postcount=17

    (Had to remove several lines because I don't have those tables. Had to add prefix to table names "zen_...")

    --Marc

 

 

Similar Threads

  1. 1062 Duplicate entry '1-1' for key 1
    By spooky130 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 18 Jun 2011, 05:33 AM
  2. 1062 Duplicate entry '38' for key 1
    By henryvuong in forum General Questions
    Replies: 1
    Last Post: 16 Jan 2008, 06:40 AM
  3. 1062 Duplicate entry '' for key 2
    By Shavelieva in forum General Questions
    Replies: 0
    Last Post: 17 Nov 2007, 06:07 AM
  4. 1062 Duplicate entry '2-1' for key 1
    By clr in forum General Questions
    Replies: 1
    Last Post: 18 May 2006, 04:46 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