Results 1 to 10 of 13

Hybrid View

  1. #1
    Join Date
    Nov 2012
    Posts
    27
    Plugin Contributions
    0

    cart error Duplicate entry for key insert into sessions

    I hope somebody can help me figure out what is going on.

    I am getting the fatal error below. The store has been running for a couple of months, but I just I started seeing this error last week (twice) after I was prompted in admin to clear the activity logs and cleared them, but I don't see how this problem could be related. I also added images to the store and updated the products using EasyPopulate.

    Any help would be greatly appreciated.


    PHP Fatal error: 1062uplicate entry '8340eefadcffec0bed57ed979efd37a7' for key 'PRIMARY' :: insert into xx_sessions
    values ('8340eefadcffec0bed57ed979efd37a7', '1366913351', 'c2VjdXJpdHlUb2tlbnxzOjMyOiI3YTkwZTk0YTQzNDFiMmFmNWIxYzI5YjUwOTgwNDk0YSI7Y3VzdG9 tZXJzX2hvc3RfYWRkcmVzc3xzOjQ3OiIxNzMtOS02MS0yNDEtTmV3RW5nbGFuZC5oZmMuY29tY2FzdGJ 1c2luZXNzLm5ldCI7Y2FydElEfHM6MDoiIjtjYXJ0fE86MTI6InNob3BwaW5nQ2FydCI6Nzp7czo4OiJ jb250ZW50cyI7YTowOnt9czo1OiJ0b3RhbCI7aTowO3M6Njoid2VpZ2h0IjtpOjA7czoxMjoiY29udGV udF90eXBlIjtiOjA7czoxODoiZnJlZV9zaGlwcGluZ19pdGVtIjtpOjA7czoyMDoiZnJlZV9zaGlwcGl uZ193ZWlnaHQiO2k6MDtzOjE5OiJmcmVlX3NoaXBwaW5nX3ByaWNlIjtpOjA7fW5hdmlnYXRpb258Tzo xNzoibmF2aWdhdGlvbkhpc3RvcnkiOjI6e3M6NDoicGF0aCI7YToxOntpOjA7YTo0OntzOjQ6InBhZ2U iO3M6MTI6InByb2R1Y3RfaW5mbyI7czo0OiJtb2RlIjtzOjM6IlNTTCI7czozOiJnZXQiO2E6Mjp7czo 1OiJjUGF0aCI7czoxOiIxIjtzOjExOiJwcm9kdWN0c19pZCI7czozOiIxOTkiO31zOjQ6InBvc3QiO2E 6MDp7fX19czo4OiJzbmFwc2hvdCI7YTo0OntzOjQ6InBhZ2UiO3M6MTI6InByb2R1Y3RfaW5mbyI7czo 0OiJtb2RlIjtzOjM6IlNTTCI7czozOiJnZXQiO2E6Mjp7czo1OiJjUGF0aCI7czoxOiIxIjtzOjExOiJ wcm9kdWN0c19pZCI7czozOiIxOTkiO31zOjQ6InBvc3QiO2E6MDp7fX19Y2hlY2tfdmFsaWR8czo0OiJ 0cnVlIjtsYW5ndWFnZXxzOjc6ImVuZ2xpc2giO2xhbmd1YWdlc19pZHxzOjE6IjEiO2xhbmd1YWdlc19 jb2RlfHM6MjoiZW4iO2N1cnJlbmN5fHM6MzoiVVNEIjt0b2RheV9pc3xzOjEwOiIyMDEzLTA0LTI1Ijt 1cGRhdGVFeHBpcmF0aW9uc3xiOjE7c2Vzc2lvbl9jb3VudGVyfGI6MTtjdXN0b21lcnNfaXBfYWRkcmV zc3xzOjEyOiIxNzMuOS42MS4yNDEiOw==') in /home/vg011web01/41/75/1017541/web/store/includes/classes/db/mysql/query_factory.php on line 120


    I am running Zen Cart 1.5.1, with UPS shipping module, Sage Payment Module, TaxCloud.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Duplicate entry for key insert into sessions

    Ask your host what changes they've made to PHP versions or PHP configuration settings lately.

    And, go to Admin->Tools->Server Info and post everything from that page here, mainly the PHPInfo settings.
    .

    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
    Nov 2012
    Posts
    27
    Plugin Contributions
    0

    Default Re: Duplicate entry for key insert into sessions

    Thank you for getting back to me.

    What sections of the PHP.INI file should I post? For security reasons, I don't want to post all the settings, or I could edit paths, IPs, domain, ports.

    Thank you again.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Duplicate entry for key insert into sessions

    Yours probably has:
    session.hash_function = sha512

    but changing it to the original setting of 1 should avoid that issue:
    session.hash_function = 1

    or you could try the even older setting of 0 .... both will work fine with ZC



    .
    Last edited by DrByte; 1 May 2013 at 07:55 PM. Reason: added footnote about using 0
    .

    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
    Nov 2012
    Posts
    27
    Plugin Contributions
    0

    Default Re: Duplicate entry for key insert into sessions

    Thanks for getting back to me.

    It was set to 0. The session settings are included below. I set it to session.hash_function = 1 in PHP.INI

    You probably know this, but I looked it up and include it here for others that may want to know '0' means MD5 (128 bits) and '1' means SHA-1 (160 bits).

    When made the change, it was very slow to login, and I couldn't get a UPS shipping quote returned from UPS. Maybe something to do with creating a session? When I tried set it back to 0, the UPS shipping quote worked again. When I tried this I hadn't been previously logged in, so there wasn't a stored session, and I did try closing my browser and logging in to the store again too a few times.

    Here's my session info

    session
    Session Support enabled
    Registered save handlers files user sqlite
    Registered serializer handlers php php_binary wddx

    Directive Local Value Master Value
    session.auto_start Off Off
    session.bug_compat_42 On On
    session.bug_compat_warn On On
    session.cache_expire 180 180
    session.cache_limiter nocache nocache
    session.cookie_domain thedomain.com no value
    session.cookie_httponly On Off
    session.cookie_lifetime 0 0
    session.cookie_path /the_store_name/the_admin_folder /
    session.cookie_secure On Off
    session.entropy_file no value no value
    session.entropy_length 0 0
    session.gc_divisor 2 100
    session.gc_maxlifetime 900 1440
    session.gc_probability 1 1
    session.hash_bits_per_character 4 4
    session.hash_function 0 0
    session.name zenAdminID PHPSESSID
    session.referer_check no value no value
    session.save_handler user files
    session.save_path /web/the_store_name/cache /var/lib/php5
    session.serialize_handler php php
    session.use_cookies On On
    session.use_only_cookies On On
    session.use_trans_sid 0 0


    Thank you again!!!
    RC

  6. #6
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Duplicate entry for key insert into sessions

    0 is an acceptable setting also. (to clarify, I've updated my previous post to reflect that.)

    Have you been able to establish any pattern of steps which specifically causes the error to be triggered?
    .

    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.

 

 

Similar Threads

  1. Replies: 5
    Last Post: 7 Mar 2015, 07:56 PM
  2. v153 PHP Fatal error: Duplicate entry for key insert into sessions
    By carlwhat in forum General Questions
    Replies: 2
    Last Post: 6 Jan 2015, 02:32 AM

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