Problem upgrading from 2.4.8 to 3.0.2

Hi all,

I´m trying to update from 2.4.8 to 3.0.2 from web link but after various minutes it displays:

Duplicate entry ‘defaultthemeplugin-0-enabled’ for key 'plugin_settings_pkey

My database is a new recent copy of the 2.4.8 database.

Can anybody help me?

Thanks!
Cristina

Are you trying to run the upgrade more than once? If so, you must restore the database and files to 2.4.8 before trying the upgrade again:

Thank you ctgraham.

I had restored the database but not filesystem.
I´m going to try again with a new backup od the database AND the 2.4.8 filesystem (I think you are talking about uploaded_files directory or I have to “restore” the ojs_3.0.2 sw toot?

Thanks you

Cristina

Hello again,

I have reinstalled from the beginning (ojs sw, ojs_uploaded_files and databa) but after 4 minutes has shown on the screen:

This page does not work

The server.domain.es page can not process this request now.
HTTP ERROR 500

The apache error log says:
[Wed May 24 11:04:52.472805 2017] [:error] PHP Fatal error: Maximum execution time of 0 seconds exceeded in /WWW/servicios/sp/ojs-3.0.2/lib/pkp/classes/db/DAO.inc.php on line 210, referer: https://servidor.domain.es/servicios/sp/ojs/index.php/index/install/upgrade

I have reviewed apache settings about timeouts and I only see something about timeouts in ssl.conf:

SSLSessionCacheTimeout 400

What value do you recommend that I put in this Directive? Is that the problem?

In the php.ini I have set:
max_execution_time = 0

Thanks in advance!
Cristina

Do you have the ability to run the upgrade from the command line (SSH access)? This would bypass any web based timeouts.

Alternately, you’ll need to check with your host to see what execution time limits they are imposing, and to see if they can temporarily relax them.

Hei ctgraham,

I have ssh access to the computer where OJS is installed. (The BD is on another computer.) But I have no idea what GIT is and how it works.

As I read (docs/UPGRADE) I should do it by using Git.

At this point and before try another update: ¿Should I restore again OJS sw, database and ojs_upload_files? Or Can it work if I just delete the contents of the cache folder and restore the DB?

Thanks in advance!

Cristina

ps: How long can the update take? → If I try again through web.

No worries about git. For your purposes, you just want to restore the database and files_dir (the OJS software you can leave as-is), then follow these “command line” instructions instead of the web-based instructions at the end of the upgrade process:

Ok, I´m going to try this way.

I’ll tell you.

Thanks!
Cristina

Hello again!

Good news! I successfully update the OJS system to 3.0.2 (in a test environment).

There are many warnings that that I do not care about:

PHP Warning: Cannot use a scalar value as an array in /WWW/sp/ojs-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /WWW/sp/ojs-3.0.2/lib/pkp/classes/db/SettingsDAO.inc.php on line 41

but others worry me more:

WARNING: Unable to find a match for “690-938-1-PB.pdf” in “/WWW/ojs_uploaded_files/journals/2//articles/690/”. Skipping this file.
WARNING: Unable to find a match for “691-939-1-PB.pdf” in “/WWW/ojs_uploaded_files/journals/2//articles/691/”. Skipping this file.

I don’t know if it will be with the double slash before “articles” or what is the reason. If the problem is severe or what can be the cause?

Thanks a lot!
Cristina

Hi @lacris,

The // is a red herring – your operating system should treat this the same as a single /. Do you get many warnings like this, or just a few?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi asmecher,

I have 41 lines with this kind of messages (with different paths).

What is this warning telling me?

Why, for example, is the system looking for “691-939-1-PB.pdf” on that path?

I can not find any reference to that file either in the database or in the ojs_uploaded_files directory.

I do not know if the update has gone well and I can tell the OJS administrator that it is already or I should investigate this subject more.

Thank you!
Cristina

Hi @lacris,

The upgrade from OJS 2.x to OJS 3.x involves rearranging the contents of the files directory. The upgrade script goes through the files listed in the database, and renames/moves them on the filesystem. The message you’re getting says that a file was listed in the database but couldn’t be found in its expected location on the filesystem.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Could you tell me where should I look for the names of that files into the database that aren´t being found into de filesystem?

Which table must I check?

I did a grep into de dump file but I didn´t find any filename of the 41 warnings list.

Thank you!
Cristina

Hi @lacris

In your old, 2.4.8 DB table article_files, there is a column file_name. Those file names listed during the upgrade come from there, i.e. you should be able to find them in that DB table.
That warning/error means that the file is in the DB but not in the file_dir i.e. that there is a mismatch between DB and files folder. This mismatch could eventually happen by a not complete file upload or deletion or an earlier bug or… Thus, all those mismatches should be fixed before the upgrade – either the missing files should be deleted from the DB (maybe best from the Web-UI/ojs workflow) or uploaded to the files_dir (with the correct name and at the correct path).
The path of the files is file_dir/journals/<journalId>/articles/<articleId>/ and then further it depends: for example the public files (with ending -PB, as your example above) go to the folder public/, the submission files (with the ending -SM) go to the folder submission/original/, the copyedited files (with the ending -CE) go to the folder submission/copyedit/, etc.
Please do not forget to backup everything before the fixing and after the successful fixing, then use that clean backup to try a new upgrade.

Best,
Bozana

Hi @bozana

thank you for your info. I’m going to talk to the OJS administrator to tell her to check all those errors and redo a clean update again.

You and @asmecher have been very helpful!

thanks to all!
Cristina

Hi
I am trying upgrade ojs 2.4 to 3.0.2. I met too muct problems.
First, Duplicate entry ‘defaultthemeplugin-0-enabled’ for key ‘plugin_settings_pkey’
problem. I solved this problem by restoring my database from backup. After that
i faced with A database error has occurred: ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry ‘2147483647’ for key ‘PRIMARY’ problem. also I have solved that problem by changing values of the tables on this DB.
later, I came across the problem of error 500. I corrected the error in php.ini file and this problem has been solved. bu now “405 not allowed /nginx” problem was appeared. Is there any one help me.

Hi @oeyeci,

Please don’t double-post; it clutters the forum. I’ve responded to your other post already.

Regards,
Alec Smecher
Public Knowledge Project Team