Page 1 of 4 123 ... LastLast
Results 1 to 10 of 38
  1. #1
    Join Date
    Apr 2005
    Location
    Derby, UK
    Posts
    8
    Plugin Contributions
    0

    Default 1062 Duplicate entry '0' for key 1 after export/import of database

    Can someone please help I am having some major problems I changed servers a few days ago at first I got this error in the admin section I found a fix on the forum and it worked.

    A couple of days ago this error started to happen on the front page all content disappears and just underneath the side boxes on the left and the side boxes on the right completely disappear.

    If I upload the old database from the backup I made before I moved servers it is fine at first but then the day after this problem is back again.

    I really need some help on this I have to get this sit backup and running I would appreciate any help that can be given.

  2. #2
    Join Date
    Apr 2005
    Location
    Derby, UK
    Posts
    8
    Plugin Contributions
    0

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

    I have managed to resolve this now from what I can gather the problem was coming from anything to do with history stored in the MySql database.

    If anyone else gets this problem drop everything from the following tables:

    • admin_activity_log
    • banners_history
    • counter_history
    • sessions


    This should sort your problem out.

  3. #3
    Join Date
    May 2006
    Posts
    2
    Plugin Contributions
    0

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

    Hello i to have this problem i am using secpay for payment the first order i ever tested on the site worked then the second one didnt giving me a '1062 Duplicate entry '0' for key 1' on a blank page, so i deleted my first order in admin and the next order worked but the same fault again with the second test, it looks like the orders are not counting up please can some one point me in the right direction thank you.

  4. #4
    Join Date
    Apr 2005
    Location
    Derby, UK
    Posts
    8
    Plugin Contributions
    0

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

    this problem has come back again please help.

  5. #5
    Join Date
    Jan 2004
    Posts
    64,985
    Blog Entries
    7
    Plugin Contributions
    76

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

    What's your URL?
    .

    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.

  6. #6
    Join Date
    May 2005
    Posts
    2
    Plugin Contributions
    0

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

    I am having a similar problem. I can tell you that I have moved my entire site recently from a Shared Hosting server to another shared server. The only difference between the two MySQL setup's is version numbers. I exported from the old to the new and everything took until I ran the program. I get this :
    http://savannahspasecrets.com (see all the way bottom left column).

    If I remove the most recent row written the app does fine until the next row... which of course is already there. It's like the app has reset the count or lost what the last ID it was on?

    The app, whether logged in as admin or visitor, writes starting from '0' to each table??

  7. #7
    Join Date
    Apr 2005
    Location
    Derby, UK
    Posts
    8
    Plugin Contributions
    0

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

    Please someone must no what is causing this and how to fix it any help will be much appreciated

  8. #8
    Join Date
    Jan 2004
    Posts
    64,985
    Blog Entries
    7
    Plugin Contributions
    76

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

    There are approx 100 tables in a Zen Cart database. Thus, the cause of that error could be related to any one of them.

    I tried to help earlier by asking:
    Quote Originally Posted by DrByte
    What's your URL?
    ... but you never replied.
    .

    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
    Jan 2004
    Posts
    64,985
    Blog Entries
    7
    Plugin Contributions
    76

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

    Quote Originally Posted by adanker
    I get this :
    http://savannahspasecrets.com (see all the way bottom left column).
    I don't see any errors on that page.
    .

    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.

  10. #10
    Join Date
    Apr 2006
    Posts
    17
    Plugin Contributions
    0

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

    Code:
    1062 Duplicate entry '0' for key 1
    in:
    [insert into admin_activity_log (access_date, admin_id, page_accessed, page_parameters, ip_address) values (now(), '1', 'attributes_controller.php', '', '**.**.0.64')]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
    Thats the error i get.

    I assume this is because the Now() function is returning 0 and not the correct date & time...
    Any suggestions on how to fix it?

    Btw, this happens only when using the admin interface...
    i'll try using the fix_cache_key, maybe that is the problem...
    have to wait to ftp it up though.

    Just tried fix_cache_key... doesn't help solve problem.
    --
    "Drunk on the Nectar of Life" - me

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Replies: 6
    Last Post: 13 Feb 2013, 06:35 AM
  2. DB Import Error #1062 - Duplicate entry '1' for key 1
    By aushy in forum Installing on a Windows Server
    Replies: 6
    Last Post: 19 Oct 2011, 11:38 AM
  3. SQL Errors when importing to new database - #1062 - Duplicate entry '3' for key 1
    By countingsheep in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 17 Sep 2009, 09:43 PM
  4. Replies: 5
    Last Post: 8 Apr 2008, 02:52 PM
  5. '1062 Duplicate entry '0' for key 1' after payment process
    By targetsp in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 18 May 2006, 03:37 PM

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