Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2011
    Posts
    65
    Plugin Contributions
    0

    Default PHP Fatal error: 1062 Duplicate entry Error, cannot fix table

    Here's my store info:

    Zen-Cart 1.5.1
    Upgraded from 1.3.9h
    Official upgrade procedure

    Running:
    Super Orders
    Edit Orders
    Ty Package
    Ceon URI
    Stock by Attributes
    Product Attribute Grid

    All the latest versions.

    So I'm getting several of those 1062 PHP errors a day, as shown by my zc logs, as well as customers emailing me about my website occasionally crashing. I've search for information about this error in the forums, and most threads indicate that the db_cache table might be corrupted and it can easily be fixed by just truncating the table.

    Well the problem is that I've been trying to truncate the table, but within seconds, the same two sql cache entries are recreated in the table (with the same exact cache-entry-name). And these are precisely the offending two cache entries causing my 1062 duplicate errors on my website.

    I've even tried dropping the db_cache table entirely and recreating the table with an SQL command, but still, within seconds, those exact same two entries with the same "cache-entry-name" are recreated again! So there appears to be two sql queries that are continually running on my database and causing me PHP fatal errors randomly throughout the day. Can anyone shed any light as to what are triggering these two queries? And a possible fix? Thank!

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

    Default Re: PHP Fatal error: 1062 Duplicate entry Error, cannot fix table

    Can you post the exact actual error message? Details are always very important.

    Also, what version of PHP are you using? What operating system does your server use?
    .

    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.

  3. #3
    Join Date
    Jan 2011
    Posts
    65
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1062 Duplicate entry Error, cannot fix table

    Quote Originally Posted by DrByte View Post
    Can you post the exact actual error message? Details are always very important.

    Also, what version of PHP are you using? What operating system does your server use?
    Of course, sorry for not including all the details:

    PHP 5.3.13
    Webhost is Apache
    Server OS is Linux 2.6.32.45-grsec-2.2.2-r3
    Server API set to FastCGI

    PHP Fatal error: 1062: Duplicate entry 'zc_6ec65decb95a7741ada473af0fde76e1' for key 'PRIMARY' :: insert into zen_db_cache set cache_entry_name = 'zc_6ec65decb95a7741ada473af0fde76e1', cache_data = xxxxxxxxxxxx
    cache_entry_created = '1361513542' in xxxxxxxxx/includes/classes/db/mysql/query_factory.php on line 120


    I removed the cache_data and replaced with xxxxx's because it was just a really long data blob.

    Please let me know if I forgot to include any other information, thanks.

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

    Default Re: PHP Fatal error: 1062 Duplicate entry Error, cannot fix table

    When did this problem start happening for you?
    .

    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. #5
    Join Date
    Jan 2011
    Posts
    65
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1062 Duplicate entry Error, cannot fix table

    Quote Originally Posted by DrByte View Post
    When did this problem start happening for you?
    Unfortunately I can't say for sure. It was dumb of me but I cleared my admin logs and cached logs several times in the past few weeks while I was upgrading my site, backing it up, and making all the necessary changes to it.

    I would say that this problem has been occurring since the upgrade to 1.5.1 from 1.3.9h though, from my best estimate, since I remember going through my website during the initial upgrade and encountering a message saying that my website had crashed and to attempt to reload it.

    I'm fairly certain that this was from the 1062 duplicate error, but it's all just conjecture.

  6. #6
    Join Date
    Feb 2010
    Posts
    38
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1062 Duplicate entry Error, cannot fix table

    Hello,

    I'm wondering if this problem have been solved for someone, since i have the same problem.

 

 

Similar Threads

  1. Replies: 33
    Last Post: 29 Dec 2014, 07:34 PM
  2. v151 PHP Fatal error: 1062:Duplicate entry
    By joyjoy in forum General Questions
    Replies: 6
    Last Post: 2 Jan 2014, 10:17 AM
  3. v151 PHP Fatal error 1062: Duplicate entry '2147483647' for key 1
    By NoobGal in forum General Questions
    Replies: 5
    Last Post: 20 Jan 2013, 05:36 PM
  4. v151 PHP Fatal error:1062:Duplicate entry '1-1' for key 'PRIMARY'
    By Dopefish in forum General Questions
    Replies: 14
    Last Post: 19 Oct 2012, 02:58 AM
  5. Replies: 4
    Last Post: 16 Jul 2012, 10:36 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