OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



DB Error: Duplicate entry for key 'sessions_pkey'

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

DB Error: Duplicate entry for key 'sessions_pkey'

Postby ubuntugirl » Mon Nov 25, 2013 9:06 am

Hi! This is an old problem I guess, but I haven't found any solution yet!
I migrated my OJS (2.3.8-) to a new server, and then, the problem started. We (the webmaster and I) tried all, but we were unable to solve it. I even installed a new OJS (2.4.2) with a new database, and the error continues. Does anybody know how I can solve this?
Ps. Sorry about my english, it's not my native language.
Regards!
ubuntugirl
 
Posts: 4
Joined: Mon Nov 25, 2013 8:39 am

Re: DB Error: Duplicate entry for key 'sessions_pkey'

Postby asmecher » Mon Nov 25, 2013 10:10 am

Hi ubuntugirl,

There are lots of threads about this on the forum, e.g. http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=10232. Among the common causes...
  • Session auto_start is enabled in your PHP configuration. This option must be disabled.
  • Session hash functions in your PHP configuration are configured to generate a hash longer than the session_id column of the "sessions" database table. You can either change the hash function in your PHP configuration to something else, or you can extend the length of the session_id column in the database.
Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8445
Joined: Wed Aug 10, 2005 12:56 pm

DB Error: Duplicate entry for key 'sessions_pkey'

Postby ubuntugirl » Tue Nov 26, 2013 12:23 pm

Hi again, asmecher.
First of all, I wanna thank you, because I found and fixed the problem today.
asmecher wrote:Session hash functions in your PHP configuration are configured to generate a hash longer than the session_id column of the "sessions" database table. You can either change the hash function in your PHP configuration to something else, or you can extend the length of the session_id column in the database.

I've extended the lenght of the session_id as you said, and it works! :)
But I have another big problem.
I lost the template. I can see the content, log in with my user, and that kind of things, but it's just a blank page with text. No style, nothing. I upgraded to a new version of OJS, hoping that this will solve it, but I still have the same problem?
So, if you could help me once more, I will appreciate it a lot.
Thanks anyways!
Regards-.
ubuntugirl
 
Posts: 4
Joined: Mon Nov 25, 2013 8:39 am

Re: DB Error: Duplicate entry for key 'sessions_pkey'

Postby asmecher » Tue Nov 26, 2013 12:28 pm

Hi ubuntugirl,

I suspect that requests for the CSS files are resulting in 403 Forbidden errors, likely due to file permissions. Check your web server's access log, and try accessing the CSS files manually to see if you're allowed.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8445
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: gemusehandler, Google [Bot] and 4 guests