Page 1 of 4 123 ... LastLast
Results 1 to 10 of 34
  1. #1
    Join Date
    Oct 2004
    Posts
    237
    Plugin Contributions
    2

    Default [Done v1.6.0] What is the answer to PHP Fatal error: 1062:Duplicate entry

    I upgraded from 1.3.x to 1.5.3 and now we have the occasional customer every day who gets a white screen at checkout stating there was a fatal error. That usually ends the online purchase process.

    We have few mods installed since the upgrade is recent:
    simple analytics, google trusted stores, sitemap xml, rss feed, image handler, fedex, usps and paypal

    I see others have the same issue and no where do I see a solution. Surely this is not the accepted state of operation. What can I do to resolve this?

    Tom


    Code:
    [09-Dec-2014 04:07:50] PHP Fatal error:  1062:Duplicate entry 'zc_d6616cb5f4c2cb55d422ea67feb723b0' for key 'PRIMARY' :: insert into db_cache set cache_entry_name = 'zc_d6616cb5f4c2cb55d422ea67feb723b0',
                                                     cache_data = 'data deleted',
                       cache_entry_created = '1418126870' ==> (as called by) /var/www/html/www.xxx.com/xxx/store/includes/classes/cache.php on line 131 <== in /var/www/html/www.xxx.com/xxx/store/includes/classes/db/mysql/query_factory.php on line 155

  2. #2
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: What is the answer to PHP Fatal error: 1062:Duplicate entry

    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Oct 2004
    Posts
    237
    Plugin Contributions
    2

    Default Re: What is the answer to PHP Fatal error: 1062:Duplicate entry

    Thanks, I'll make the change. I appreciate it.
    Tom

  4. #4
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: What is the answer to PHP Fatal error: 1062:Duplicate entry

    Quote Originally Posted by tomarriola View Post
    Thanks, I'll make the change. I appreciate it.
    Tom
    Welcome, as uu have possibly read in that thread (as well there is another with a similar suggestion), this is what has been called a race condition. Basically a request or record already exists and then another similar request is made before the previous has completely finished.

    There is a second suggested solution using the mysql replace into command instead of both the insert ignore into and update commands. This looks simplified and compact, but there is some concern about the operations of the replace command that it deletes and inserts routinely as compared to insert and update. Perhaps with more data of comparison the choice can be settled. :) I've had them both in place with no repeated occurrence of the duplicate key issue.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: What is the answer to PHP Fatal error: 1062:Duplicate entry

    I can say that after applying the the insert/ignore edits, I went 10 days without seeing any generation of the MyDebug file

    For the last 4 days, the same 100Kb MyDebug file (1062 Duplicate entry) has been generated at least once per day.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,500
    Plugin Contributions
    88

    Default Re: What is the answer to PHP Fatal error: 1062:Duplicate entry

    Do you have any idea as to whether the customer's IP address was IPv4 or IPv6? (a shot in the dark)

  7. #7
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: What is the answer to PHP Fatal error: 1062:Duplicate entry

    I did look at the server log for this morning and during the timeframe the file was generated there were only 2 lines during that timestamp.4 lines if you include a few minutes before and after, so it was not what I would call a very busy time.

    I did notice that there is no specific URL associated with the GET


    Code:
    157.55.39.141 - - [10/Dec/2014:03:07:17 -0800] "GET /index.php?cpath=2_16&sort=20a&page=2 HTTP/1.1" 200 7383 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
    110.93.14.68 - - [10/Dec/2014:03:09:48 -0800] "GET / HTTP/1.1" 200 91 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11"
    110.93.14.68 - - [10/Dec/2014:03:09:48 -0800] "GET / HTTP/1.1" 200 7574 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11"
    157.55.39.19 - - [10/Dec/2014:03:16:38 -0800] "GET /index.php?cPath=4_52_143&products_id=796 HTTP/1.1" 200 8792 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  8. #8
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: What is the answer to PHP Fatal error: 1062:Duplicate entry

    On Dec 08, the MyDebug file was generated 3 times during the same timestamp. There was something different. Every other occurance of the MyDebug have been identical. 2 of the files were the same, 100Kb files. The middle one was different, 20Kb, though same 1062 error

    Server logfile only has 130 lines for that timestamp which doesn't seem overly busy.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  9. #9
    Join Date
    Oct 2004
    Posts
    237
    Plugin Contributions
    2

    red flag PHP Fatal error: 1062 is not a bug -- it is a software failure

    I am appalled that zencart is not fixing the PHP Fatal error: 1062 issue. The fixes offered by users do not solve the issue.

    All of us using zencart 1.5.x have errors in our /logs/ but most of us don't know they are there. Check your zencart logs and you'll see errors like below:

    Code:
    [10-Dec-2014 09:32:35] PHP Fatal error:  1062:Duplicate entry 'zc_d6616cb5f4c2cb55d422ea67feb723b0' for key 'PRIMARY' :: insert into db_cache set cache_entry_name = 'zc_d6616cb5f4c2cb55d422ea67feb723b0',
    This error means your customer got a white screen saying there was a fatal error. This means the money spent to get the customer was wasted because some people find a fatal error scary when they visit a commerce site.

    I need to sell things and if zencart isn't helping me do this it must be fixed. Is this a financial issue? I have donated to zencart before but if a direct payment to someone would fix this I would be happy to pay in order to use zencart to sell things rather than deliver fatal error messages to paying customers.

    I have been using zencart since version 1 but this is enough to make me finally switch to a commercial tool. Can you imagine volusion shrugging their shoulders at a fatal error. No-- I suspect they'd sit down and fix it.

    Consider me outraged.


    Tom Arriola

  10. #10
    Join Date
    Oct 2004
    Posts
    237
    Plugin Contributions
    2

    Default Re: What is the answer to PHP Fatal error: 1062:Duplicate entry

    I applied the fix and the errors remain. This is why people use commercial software rather than open source. A commercial tool would be fixed when the first sign of trouble reared its head. We need to wait for someone more clever than ourselves to fix this. And wait. And wait.

    I am a long time zen user who may have finally reached the end of his patience with zencart.

    Tom

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Replies: 3
    Last Post: 21 Jan 2016, 10:35 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. 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
  4. 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
  5. 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

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