OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



'PASSWORD_RESET_CONFIRM' for key 2

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.

'PASSWORD_RESET_CONFIRM' for key 2

Postby tony4 » Sat Oct 07, 2006 6:44 pm

Dear all, I tried to install OJS manually and got the following error message. Would anyone know what the problem is? Thank you ahead. Tony (http://www.raam.org.uk).

Errors occurred during installation:
A database error has occurred: Duplicate entry 'PASSWORD_RESET_CONFIRM' for key 2
tony4
 
Posts: 1
Joined: Sat Oct 07, 2006 6:09 pm

Postby asmecher » Mon Oct 09, 2006 2:11 am

Hi Tony4,

It looks like you're trying to insert emails into the database twice; this can happen if an initial installation attempt fails, leaving entries in the database tables. Alternately, are you attempting to perform an automated install after completing the manual installation?

Regards,
Alec Smecher
Open Journal Systems Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

DB Error: Duplicate entry 'ge' for key 2

Postby ramon » Tue Mar 20, 2007 8:23 am

Alec,

I couldn't find any other similar posts, with the following problem.
I'm not sure it is related to this one, but since it has a similar error message, I'll post here.

The user was trying to edit the Metadata in a submission and this error showed up.

DB Error: Duplicate entry 'ge' for key 2

When enabling the stack trace this appeared.
The special characters not being printed here and in our forum I assume it's a charset output problem, but I'm not really sure. I asked the user and he confirmed that he only copied and pasted what appeared. On the browser, the characters seem to be correct, but I have no access.

Any ideas?

Stack Trace:
File: /usr/local/apache2/htdocs/seer/classes/search/ArticleSearchDAO.inc.php line 45
Function: articlesearchdao->update("INSERT INTO article_search_keyword_list (keyword_text) VALUES (?...", "ge�grafo")

File: /usr/local/apache2/htdocs/seer/classes/search/ArticleSearchDAO.inc.php line 201
Function: articlesearchdao->insertkeyword("ge�grafo")

File: /usr/local/apache2/htdocs/seer/classes/search/ArticleSearchIndex.inc.php line 37
Function: articlesearchdao->insertobjectkeyword("18", "ge�grafo", 4)

File: /usr/local/apache2/htdocs/seer/classes/search/ArticleSearchIndex.inc.php line 53
Function: articlesearchindex::indexobjectkeywords("18", Array(20), 4)

File: /usr/local/apache2/htdocs/seer/classes/search/ArticleSearchIndex.inc.php line 167
Function: articlesearchindex::updatetextindex("1", 1, Array(20))

File: /usr/local/apache2/htdocs/seer/classes/submission/form/MetadataForm.inc.php line 252
Function: articlesearchindex::indexarticlemetadata(Object(sectioneditorsubmission))

File: /usr/local/apache2/htdocs/seer/classes/submission/common/Action.inc.php line 139
Function: metadataform->execute()

File: /usr/local/apache2/htdocs/seer/pages/sectionEditor/SubmissionEditHandler.inc.php line 698
Function: sectioneditoraction::savemetadata(Object(sectioneditorsubmission))

File: /usr/local/apache2/htdocs/seer/pages/sectionEditor/SectionEditorHandler.inc.php line 314
Function: submissionedithandler::savemetadata()

File: (unknown) line (unknown)
Function: editorhandler::savemetadata(Array(0))

File: /usr/local/apache2/htdocs/seer/index.php line 46
Function: call_user_func(Array(2), Array(0))

File: /usr/local/apache2/htdocs/seer/index.php line 57
Function: handlerequest()
ramon
 
Posts: 927
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Postby asmecher » Tue Mar 20, 2007 9:03 am

Hi Ramón,

This is probably caused by a mismatch in configuration between the database character set and the UTF-8 that OJS is using. This configuration usually works fine (although it's not perfect) except occasionally the indexing process will run across an error like this. You can try these patches from CVS (please use all):

http://pkp.sfu.ca/cvs/cvsweb.cgi/ojs2/classes/search/ArticleSearchDAO.inc.php.diff?r1=1.26;r2=1.27
http://pkp.sfu.ca/cvs/cvsweb.cgi/ojs2/classes/search/ArticleSearchIndex.inc.php.diff?r1=1.21;r2=1.22

Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Multi-byte string support in PHP

Postby ramon » Thu Mar 22, 2007 12:17 pm

Hi Alec,

According to the technical support of the journal in question, he corrected the problem.
PHP was not supporting multi-byte strings. Doing so fixed the problem.

Hope this helps others...
ramon
 
Posts: 927
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

DB Error: Duplicate entry 'xxx' for key 2 - migration

Postby ramon » Fri Mar 23, 2007 1:51 pm

Alec,

A user is attempting to migrate and it previously worked. Now it's not working anymore.

This is the stacktrace error message... (some characters are gone because I was on messenger with the user...).
Apparently, charset for conection and database are UTF-8, there was no server changes or upgrades. Memory limit is set to 16M.

Errors show using shell and browser migration tools.

I assume it's the multibyte string support thing, but I don't know how to check for that...

Code: Select all
<h1>DB Error: Duplicate entry 'bragan' for key 2</h1><h4>Stack Trace/h4>
<b>File/b> /jaula/home/www/teste/ojs-2.1.1/classes/user/UserDAO.inc.php line 195<br />
<b>Function/b> userdao->update("INSERT INTO users
                                (username, password, first_name, middle_na...", Array(20))<br />
<br/>
<b>File/b> /jaula/home/www/teste/ojs-2.1.1/classes/site/ImportOJS1.inc.php line 590<br />
<b>Function/b> userdao->insertuser(Object(user))<br />
<br/>
<b>File/b> /jaula/home/www/teste/ojs-2.1.1/classes/site/ImportOJS1.inc.php line 189<br />
<b>Function/b> importojs1->importusers()<br />
<br/>
<b>File/b> /jaula/home/www/teste/ojs-2.1.1/tools/migrate.php line 70<br />
<b>Function/b> importojs1->import("teste", "/jaula/home/www/teste/ojs", Array)<br />
<br/>
<b>File/b> /jaula/home/www/teste/ojs-2.1.1/tools/migrate.php line 86<br />
<b>Function/b> migrate->execute()<br />
<br/>
OJS: DB Error: Duplicate entry 'bragan' for key 2
ramon
 
Posts: 927
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Postby asmecher » Mon Mar 26, 2007 11:59 am

Hi Ramón,

What indexes are there on the users table? Try running the following query:
Code: Select all
SHOW INDEXES FROM users;
Regards,
Alec Smecher
Open Journal Systems Team
---
Don't miss the First International PKP Scholarly Publishing Conference
July 11 - 13, 2007, Vancouver, BC, Canada
http://ocs.sfu.ca/pkp2007/
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 3 guests