Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2010
    Posts
    612
    Plugin Contributions
    0

    Default PHP Fatal error: 1062:Duplicate entry

    Can anyone please help. These errors just started in my logs and I can't figure out how to fix it. Can anyone please help? Thank you.

    PHP Fatal error: 1062uplicate entry 'ca34fbe5f9a075091ad59abf02c259a7-1' for key 'PRIMARY' :: INSERT INTO zen_seo_cache (cache_id, cache_language_id, cache_name, cache_data, cache_global, cache_gzip, cache_method, cache_date, cache_expires) VALUES ('ca34fbe5f9a075091ad59abf02c259a7', '1', 'seo_urls_v2_products', 'tL1bkys7jh767l9x3saOOIpQXiWFnxy2H30Jh8+zI6VSVWmXLjW6rNVr//

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: PHP Fatal error: 1062:Duplicate entry

    Quote Originally Posted by joyjoy View Post
    Can anyone please help. These errors just started in my logs and I can't figure out how to fix it. Can anyone please help? Thank you.

    PHP Fatal error: 1062uplicate entry 'ca34fbe5f9a075091ad59abf02c259a7-1' for key 'PRIMARY' :: INSERT INTO zen_seo_cache (cache_id, cache_language_id, cache_name, cache_data, cache_global, cache_gzip, cache_method, cache_date, cache_expires) VALUES ('ca34fbe5f9a075091ad59abf02c259a7', '1', 'seo_urls_v2_products', 'tL1bkys7jh767l9x3saOOIpQXiWFnxy2H30Jh8+zI6VSVWmXLjW6rNVr//
    The cause of the problem is a lot more difficult to identify than the fix. This means I'm about to tell you how to fix the problem, but I can't make any claims that the problem won't re-occur.

    Log into the cPanel of your hosting account (if you don't use cPanel you should still be able to follow the same steps with whatever control panel you do have).

    Look for the 'phpMyadmin' tool and activate it.
    Navigate your way to your store database and click on the tabled named "zen_seo_cache"
    Click on the 'Operations' TAB.
    Then click the link that reads "Empty the table (TRUNCATE)"

    That's it. The errors should now now go away. They may or may not return again, as this will depend on the cause of the problem. If the problem reoccurs consistently it will warrant further investigation, but if it re-occurs only rarely it is probably caused by some kind of 'race condition' and can probably be ignored as it isn't something that you or I will be able to resolve.

    Cheers
    Rod

  3. #3
    Join Date
    Sep 2010
    Posts
    612
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1062:Duplicate entry

    Thank you so much for your help. I will try this. Also I realize I didn't include the end of the error log. I'm not sure if this will help any.

    "...mysql/query_factory.php on line 120"

    Thank you.

  4. #4
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: PHP Fatal error: 1062:Duplicate entry

    Quote Originally Posted by joyjoy View Post
    Also I realize I didn't include the end of the error log. I'm not sure if this will help any.

    "...mysql/query_factory.php on line 120"
    In this instance it doesn't matter. This is simply telling us that it is "mysql/query_factory.php" reporting/recording the errors.
    This will be consistent with almost all zencart SQL errors.

    Cheers
    Rod

  5. #5
    Join Date
    Feb 2013
    Posts
    6
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1062:Duplicate entry

    Rod, i wonder if you could kindly assist. I have been experiencing a problem with the order confirmation emails coming through. Most of the time this works perfectly but sometimes it doesnt. The only way of me knowing that there is an order is when I receive an email from 2Checkout. I tried to do what you stated above but I have experienced the same problem again. I have posed this query before and I didnt get much help. I am using version 1.5.0. I havent updated to the latest version. On going through the cashe as I was directed to do, this is the error that was recorded on one of the days when the email didnt come through:
    [01-Sep-2013 11:05:34] PHP Fatal error: 1062uplicate entry 'zc_9b41e5ce79b3ea0cb51c3c6e45a797e8' for key 'PRIMARY' :: insert into znc_db_cache set cache_entry_name = 'zc_9b41e5ce79b3ea0cb51c3c6e45a797e8',
    cache_data = 'YTo4OntpOjA7YTo0OntzOjEzOiJjYXRlZ29yaWVzX2lkIjtzOjM6IjE2OSI7czoxNToiY2F0ZWdvcml lc19uYW1lIjtzOjU6IkdpZnRzIjtzOjk6InBhcmVudF9pZCI7czoxOiIwIjtzOjE2OiJjYXRlZ29yaWV zX2ltYWdlIjtOO31pOjE7YTo0OntzOjEzOiJjYXRlZ29yaWVzX2lkIjtzOjM6IjE3OCI7czoxNToiY2F 0ZWd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iIxMTkiO3M6MTU6ImNhdGVnb3JpZXNfbmFtZSI7czoxOToiUGV yc29uYWwgVG9pbGV0cmllcyI7czo5OiJwYXJlbnRfaWQiO3M6MToiMCI7czoxNjoiY2F0ZWdvcmllc19 pbWFnZSI7Tjt9fQ==',
    cache_entry_created = '1378055134' in /home4/zimbogin/public_html/includes/classes/db/mysql/query_factory.php on line 101
    Please can you assist as I need to get this resolved as soon as possible. Thank you.

  6. #6
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: PHP Fatal error: 1062:Duplicate entry

    Quote Originally Posted by Nyasha View Post
    ... I have been experiencing a problem with the order confirmation emails coming through. Most of the time this works perfectly but sometimes it doesnt. ...
    I doubt this error message is associated with an issue with emails.... But if you want those "errors" with "db_cache" to go away, just turn off "database" caching (for potentially long running database queries). This may have a small impact on performance (in some cases may be negative, in others positive)...

    Go into "/includes/configure.php" and "/admin/includes/configure.php" and change the setting for 'SQL_CACHE_METHOD' to 'none'. Yes, this needs to be done in both places.

    Note: For a full description of this (and other) settings in the configure.php please read this article.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  7. #7
    Join Date
    Aug 2013
    Location
    Perth, WA, AU
    Posts
    173
    Plugin Contributions
    3

    Default Re: PHP Fatal error: 1062:Duplicate entry

    I'm periodically getting a similar error , if anyone can help -

    [02-Jan-2014 02:58:30 Australia/Perth] PHP Fatal error: 1062uplicate entry 'zc_d6616cb5f4c2cb55d422ea67feb723b0' for key 'PRIMARY' :: insert into db_cache set cache_entry_name = 'zc_d6616cb5f4c2cb55d422ea67feb723b0',
    cache_data = 'YTo1ODM6e2k6MDthOjI6e3M6NjoiY2Zna2V5IjtzOjEwOiJTVE9SRV9OQU1FIjtzOjg6ImNmZ3ZhbHV lIjtzOjE0OiJGdW5reSBCYWxsb29ucyI7fWk6M

    ending ....

    jt9aTo1Nzk7YToyOntzOjY6ImNmZ2tleSI7czozNzoiUFJPRFVDVF9MSVNUSU5HX0xBWU9VVF9TVFlMR V9DVVNUT01FUiI7czo4OiJjZmd2YWx1ZSI7czoxOiIwIjt9aTo1ODA7YToyOntzOjY6ImNmZ2tleSI7c zoyNToiUFJPRFVDVF9MSVNUSU5HX0dSSURfU09SVCI7czo4OiJjZmd2YWx1ZSI7czoxOiIwIjt9aTo1O DE7YToyOntzOjY6ImNmZ2tleSI7czoyNzoiU1RPUkVfVEVMRVBIT05FX0NVU1RTRVJWSUNFIjtzOjg6I mNmZ3ZhbHVlIjtzOjA6IiI7fWk6NTgyO2E6Mjp7czo2OiJjZmdrZXkiO3M6MTY6IlNTTFBXU1RBVFVTQ 0hFQ0siO3M6ODoiY2ZndmFsdWUiO3M6MDoiIjt9fQ==',
    cache_entry_created = '1388602710' in /clientdata/n5200-2-static/f/u/funkyballoons.com.au/www/zencart/includes/classes/db/mysql/query_factory.php on line 120

 

 

Similar Threads

  1. Replies: 33
    Last Post: 29 Dec 2014, 07:34 PM
  2. PHP Fatal error: 1062 Duplicate entry Error, cannot fix table
    By RoboPhung in forum General Questions
    Replies: 5
    Last Post: 10 Apr 2013, 09:03 PM
  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