Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Feb 2012
    Posts
    24
    Plugin Contributions
    0

    Default PHP Fatal error:1062:Duplicate entry '1-1' for key 'PRIMARY'

    Hi everyone, I have a fairly fresh install of zencart 151, I only have ckeditor and usps united states postal service plugins installed, when I go to "option name manager" and enter "color" as dropdown then go to "option value manager" and enter "white" all I get is this error

    WARNING: An Error occurred, please refresh the page and try again.

    I looked into the log and it gave me the following.......

    [18-Oct-2012 14:03:31] PHP Fatal error: 1062: Duplicate entry '1-1' for key 'PRIMARY' :: insert into zen_products_options_values
    (products_options_values_id, language_id, products_options_values_name, products_options_values_sort_order)
    values ('1',
    '1',
    'White',
    '0') in /home/lazer/public_html/includes/classes/db/mysql/query_factory.php on line 120

    please help, I have no idea what is wrong.......

    Thank you

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    67,380
    Plugin Contributions
    6

    Default Re: PHP Fatal error:1062:Duplicate entry '1-1' for key 'PRIMARY'

    Did you empty tables manually in phpMyAdmin to remove original data from the product tables?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.3]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  3. #3
    Join Date
    Jan 2004
    Posts
    60,313
    Blog Entries
    4
    Plugin Contributions
    144

    Default Re: PHP Fatal error:1062:Duplicate entry '1-1' for key 'PRIMARY'

    Was this an import of data from another database?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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.



  4. #4
    Join Date
    Feb 2012
    Posts
    24
    Plugin Contributions
    0

    Default Re: PHP Fatal error:1062:Duplicate entry '1-1' for key 'PRIMARY'

    I clicked on phpmyadmin what one do I click on from the left side, and once I do how do I empty the original data ?

    information_schema
    lazer
    _main
    _phpb728
    _zenc718
    _zenc966

    thanks

  5. #5
    Join Date
    Jan 2004
    Posts
    60,313
    Blog Entries
    4
    Plugin Contributions
    144

    Default Re: PHP Fatal error:1062:Duplicate entry '1-1' for key 'PRIMARY'

    Um ... nobody is telling you to empty any data.

    Ajeh was asking IF you had done anything like that.

    Honestly, if you have to ask that question, you really should stop right there and close that window.
    Proceeding any further could result in a serious loss of data and thus take your website down.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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.



  6. #6
    Join Date
    Feb 2012
    Posts
    24
    Plugin Contributions
    0

    Default Re: PHP Fatal error:1062:Duplicate entry '1-1' for key 'PRIMARY'

    I had stablehost do a reset so I could start fresh, I have old backups but I haven't used them, it was simply reset because I wanted to start over with a new business name.

  7. #7
    Join Date
    Feb 2012
    Posts
    24
    Plugin Contributions
    0

    Default Re: PHP Fatal error:1062:Duplicate entry '1-1' for key 'PRIMARY'

    lol, ok, I never did that, just installed zencart and began building it :)

  8. #8
    Join Date
    Jan 2004
    Posts
    60,313
    Blog Entries
    4
    Plugin Contributions
    144

    Default Re: PHP Fatal error:1062:Duplicate entry '1-1' for key 'PRIMARY'

    Very odd.

    I just set up a fresh install of Zen Cart (using zc_install), no addons/plugins. Just plain install, with Demo products deselected during zc_install.
    Log in to my admin.
    Go to "option name manager" and enter "color" as dropdown
    Then go to "option value manager" and enter "white". No sort order, just left it blank.

    No error message. White shows up in the list, designated as a dropdown.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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
    Feb 2012
    Posts
    24
    Plugin Contributions
    0

    Default Re: PHP Fatal error:1062:Duplicate entry '1-1' for key 'PRIMARY'

    it just brings me to a blank page with this message "WARNING: An Error occurred, please refresh the page and try again."

    this is the link it is pointing at
    "options_values_manager.php?action=add_product_option_values&value_page=1

  10. #10
    Join Date
    Jan 2004
    Posts
    60,313
    Blog Entries
    4
    Plugin Contributions
    144

    Default Re: PHP Fatal error:1062:Duplicate entry '1-1' for key 'PRIMARY'

    It bothers me that your database appears to be damaged.

    I'm inclined to suggest that a fresh install would be prudent.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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.



 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 PHP Fatal error: 1062:Duplicate entry '1-1' for key 1 when adding attributes
    By videorepair in forum Upgrading from 1.3.x to 1.5.x
    Replies: 4
    Last Post: 16 Jul 2012, 10:36 PM
  2. 1062 Duplicate entry '31' for key 'PRIMARY'
    By yisou in forum General Questions
    Replies: 1
    Last Post: 8 Apr 2012, 05:18 PM
  3. 1062 Duplicate entry '5754' for key 'PRIMARY'
    By Pike Promo in forum General Questions
    Replies: 5
    Last Post: 17 Nov 2011, 04:52 AM
  4. Error when importing DB - #1062 - Duplicate entry '1' for key 'PRIMARY'
    By CheapStairParts in forum General Questions
    Replies: 0
    Last Post: 5 Jan 2011, 03:10 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
  •