Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2006
    Location
    North Carolina
    Posts
    248
    Plugin Contributions
    0

    Default Duplicate entry error on sessions table with new install on Mountain Lion Server

    Hey gang,

    I've been working with a test Mountain Lion Server building a new zencart site. Everything is ready to go, so I starting setting up my MacPro with another ML Server 10.8.2 to run the live site.

    Multiple issues today:

    1. After installing mySQL 5.5.29 community edition (test server used 5.5.14), I opened myphpadmin and setup my database for installing ZenCart.
    Upon Zencart installation, the database wouldn't install at all over localhost or the external ip address (even though myphpadmin IS accessing with localhost!!). Multi-checked everything and all was perfect in the mySQL setup, user and password.

    Finally, the ONLY way the database would install is over a host of: 127.0.0.1.

    Then continued the install until everything was completed.

    The customer side of ZenCart came up perfectly. :-)

    BUT

    2. Now, I cannot log into the admin with the user I created after the admin folder name was changed and ZC folder deleted. Tried and tried to no avail today. I reinstalled many times from scratch even deleting the mysql database and reinstalling all the apps.

    WARNING: An Error occurred, please refresh the page and try again.

    Here is the log file I received when I tried to log into the admin:

    [27-Jan-2013 03:05:24 UTC] PHP Fatal error: 1062uplicate entry 'clmt7v4rkh46cufufqm5jq4kca7vm77c0p0k4t2v4ctgpill8e8eut6jug1jlrgr' for key 'PRIMARY' :: insert into sessions
    values ('clmt7v4rkh46cufufqm5jq4kca7vm77c0p0k4t2v4ctgpill8e8eut6jug1jlrgr9ldhmcraptlmdo 12jput8i4i18t3pnhr2h1nic1', '1359256824', 'c2VjdXJpdHlUb2tlbnxzOjMyOiIzYmRmYzE5ZDIzOTc2MjQyYWJiYTA4NTY4M2M2ZWQ0NiI7bGFuZ3V hZ2V8czo3OiJlbmdsaXNoIjtsYW5ndWFnZXNfaWR8czoxOiIxIjtsYW5ndWFnZXNfY29kZXxzOjI6ImV uIjtzZWxlY3RlZF9ib3h8czoxMzoiY29uZmlndXJhdGlvbiI7aHRtbF9lZGl0b3JfcHJlZmVyZW5jZV9 zdGF0dXN8czo0OiJOT05FIjs=') in /Users/Shared/websites/zen-cart-v1.5.1/includes/classes/db/mysql/query_factory.php on line 120




    Guys.... I lost on this. I have 2 other computers running ZenCart, but this OSX server will not install correctly. Those other 2 work perfectly under localhost, which makes this even more strange.
    Any ideas?

    I can't figure out if the OSX install is 'wonky' or if it's the newer version of mySQL or something else.

    thanks everyone,

    Jeff Michaels,
    musicalcreations.com
    Jeff Michaels,
    pres of Musical Creations Ltd.

  2. #2
    Join Date
    Jan 2004
    Posts
    60,330
    Blog Entries
    4
    Plugin Contributions
    144

    Default Re: Multiple issues with new install on Mountain Lion Server

    What's the PHP version?
    What are the following values set to in your php.ini?
    session.hash_bits_per_character
    session.hash_function

    Zen Cart v1.5.1 and older were built based on the common configuration of:
    session.hash_function = 1

    Change yours back to 1 if you can.

    If that's been set to something different (and newer PHP versions are starting to change that), then you may have problems. Reverting it back to 1 may provide relief for now. While you should have no problem reverting it when you're the server administrator, if you can't then you may need to change the code.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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
    Aug 2006
    Location
    North Carolina
    Posts
    248
    Plugin Contributions
    0

    Default Re: Multiple issues with new install on Mountain Lion Server

    PHP - 5.3.15

    ; session.hash_bits_per_character
    ; Default Value: 4
    ; Development Value: 5
    ; Production Value: 5


    ; http://php.net/session.hash-function
    session.hash_function = sha512
    Jeff Michaels,
    pres of Musical Creations Ltd.

  4. #4
    Join Date
    Aug 2006
    Location
    North Carolina
    Posts
    248
    Plugin Contributions
    0

    Default Re: Multiple issues with new install on Mountain Lion Server

    I got it

    ; http://php.net/session.hash-function
    session.hash_function = sha512

    I compared the other test server and it was

    ; http://php.net/session.hash-function
    session.hash_function = 1

    I changed it to 1 and immediately, the admin worked after I restarted the web server. But I still have no idea why I cannot use localhost in the setup. hmmm
    Any ideas?
    Jeff Michaels,
    pres of Musical Creations Ltd.

  5. #5
    Join Date
    Mar 2013
    Location
    California, United States
    Posts
    1
    Plugin Contributions
    0

    Default Re: Multiple issues with new install on Mountain Lion Server

    The error I was getting was:
    [24-Mar-2013 08:42:55 UTC] PHP Fatal error: 1406: Data too long for column 'sesskey' at row 1 :: insert into sessions
    values ('nj2j28msme7fprpl1qhkoq1qrrr5ks2qs1o2av2p64ea2f7amvk86s9gnoc8a6kd3mloff53pri3vc 8kf2jtlts4ophcaidhovbo240', '1364116015', 'c2V ~snip~ CI7') in /Library/Server/Web/Data/Sites/www.craftyharp.local/includes/classes/db/mysql/query_factory.php on line 120

    Editing the php.ini file and setting the session.hash_function = 1 fixed the problem for me as well!

 

 

Similar Threads

  1. Replies: 6
    Last Post: 30 Dec 2012, 11:44 AM
  2. COWOA (for 1.3.9) Fails with 1062 Duplicate entry error
    By ouroboros in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 18 Jun 2012, 07:26 PM
  3. Duplicate entry in sessions table
    By fibre in forum Bug Reports
    Replies: 0
    Last Post: 11 Oct 2010, 06:26 PM
  4. added new table: now get 1062 Duplicate entry error
    By NickCB1966 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 4 Jul 2010, 10:53 PM
  5. Help with new install 1146 Table error
    By valnoren in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 29 Apr 2008, 08:30 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
  •