During upgrade from OJS 3.1.2.4 to OJS 3.2.1.2 I receive the following database error:
Upgrade error: Duplicate entry ‘0-1’ for key ‘citations_publication_seq’
Linux, 7.2.34 Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.16 mysqli 5.5.68-MariaDB
Explain step by step what I should do to update our scientific journal. Something I didn’t succeed.
Help a newbie in this matter
As I understand it, the problem is in the relationships of these tables (attached)
There are citations entries and submissions indicate null
Maybe I’m wrong about something else. But it’s definitely wrong
I really hope for your qualified opinion, opinion and help.
also error for: php lib/pkp/tools/parseCitations.php all
with respect
Ph.D. Kuprienko Sergey!
citations|690x470

1 Like
Hi @Scientific_World,
(This conversation is continued from pkp/pkp-lib#5626)
Regarding this message:

Double-check your command line PHP version by running php --version
. I suspect it’s older than the PHP 7.2 that OJS 3.2.1-2 requires. Some servers have several versions of PHP; you might need to specify the right one to use, such as:
/path/to/php /another/path/to/lib/pkp/tools/parseCitations.php
(…replacing /path/to
and /another/path/to
with the right paths for your server.)
Regards,
Alec Smecher
Public Knowledge Project Team
I’ll try. I’ll write about the results. Thank you for responding.
nothing has happened.
Or did I do something wrong again?
nothing has changed in the database. as there were NULL and remained.
Hi @Scientific_World,
That appears to be a CGI version of PHP, i.e. intended to interact with the web server. You’ll need to find your command-line (CLI) version of PHP. You can tell which you’re running /path/to/php -v
, e.g.:
/usr/bin/php -v
PHP 7.4.3 (cli) (built: Oct 6 2020 15:47:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies
Note the (cli)
in this example.
Regards,
Alec Smecher
Public Knowledge Project Team
here’s what happened: some other errors

I ran this before updating.
Data changes have occurred in the database in the table.
Then I ran the update - but again:
Duplicate entry ‘0-1’ for key ‘citations_publication_seq’
What I figured out:
- php starts and make changes
- if there is no data in citations table, then the update is installed
Explain how I can recover the citations table data.
I’m confused. Help step by step.
YES!!!
i did it !!!
1.clean the citation table
2.start update
3.start php /path/to/lib/pkp/tools/parseCitations.php
EVERYTHING WORKS
I was doing some changes to the index file and translations.
It remains to remember what and where to return the appearance.
can you tell me how to update the system so that the changes remain.
I beg you step by step:
1.
2.
…
1 Like
Hi @Scientific_World,
Great, I’m glad to hear that’s resolved!
Could you post your question about layout changes as a new topic? That’ll help keep the forum organized for others who might be looking for similar information.
Regards,
Alec Smecher
Public Knowledge Project Team