Upgrading with or without previous patches?

Hi all,

I want to re-update mi OJS installation from 2.4.8 to 3.1.1 but I´ve seen that there are some patches that I don´t know if I have to apply before upgrading or it´s not necessary.

I´m talking about going from 2.4.8 to 2.4.8-3 and then, upgrade to 3…1.1

Thanks in advance!
Cristina

If I exec this:

patch -p1 –dry-run <ojs-2.4.8_to_2.4.8-3.patch

it doesn´t appear that the patch applies cleanly because of this output (sorry for it size). As I can´t attach a file, i copy and paste some lines (there are 8258 lines):

checking file classes/admin/form/JournalSiteSettingsForm.inc.php
checking file classes/admin/form/SiteSettingsForm.inc.php
checking file classes/announcement/AnnouncementDAO.inc.php
checking file classes/announcement/Announcement.inc.php
checking file classes/announcement/AnnouncementTypeDAO.inc.php
checking file classes/announcement/AnnouncementType.inc.php
checking file classes/article/ArticleCommentDAO.inc.php
checking file classes/article/ArticleComment.inc.php
checking file classes/article/ArticleDAO.inc.php
checking file classes/article/ArticleFileDAO.inc.php
checking file classes/article/ArticleFile.inc.php
checking file classes/article/ArticleGalleyDAO.inc.php
checking file classes/article/ArticleGalley.inc.php

checking file classes/user/UserSettingsDAO.inc.php
checking file config.inc.php
Hunk #1 FAILED at 7.
Hunk #2 FAILED at 302.
Hunk #3 FAILED at 315.
Hunk #4 succeeded at 402 (offset -27 lines).
3 out of 4 hunks FAILED
checking file config.TEMPLATE.inc.php
Hunk #2 succeeded at 303 (offset 1 line).
Hunk #3 succeeded at 321 (offset 1 line).
Hunk #4 succeeded at 430 (offset 1 line).
checking file controllers/grid/citation/CitationGridHandler.inc.php
checking file controllers/statistics/form/ReportGeneratorForm.inc.php
checking file controllers/statistics/ReportGeneratorHandler.inc.php
checking file dbscripts/xml/install.xml

checking file plugins/importexport/datacite/DataciteInfoSender.inc.php
checking file plugins/importexport/datacite/index.php
checking file plugins/importexport/datacite/locale/ar_IQ/common.xml
checking file plugins/importexport/datacite/locale/ar_IQ/locale.xml
checking file plugins/importexport/datacite/locale/ca_ES/common.xml
Hunk #1 FAILED at 3.
1 out of 1 hunk FAILED
checking file plugins/importexport/datacite/locale/ca_ES/locale.xml
checking file plugins/importexport/datacite/locale/cs_CZ/common.xml
checking file plugins/importexport/datacite/locale/cs_CZ/locale.xml
checking file plugins/importexport/datacite/locale/da_DK/locale.xml
checking file plugins/importexport/datacite/locale/de_DE/common.xml
Hunk #1 FAILED at 4.
Hunk #2 FAILED at 63.
2 out of 2 hunks FAILED
checking file plugins/importexport/datacite/locale/de_DE/locale.xml
checking file plugins/importexport/datacite/locale/en_US/common.xml
Hunk #1 FAILED at 4.
Hunk #2 FAILED at 63.
2 out of 2 hunks FAILED
checking file plugins/importexport/datacite/locale/en_US/locale.xml
checking file plugins/importexport/datacite/locale/es_AR/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/datacite/locale/es_AR/locale.xml
checking file plugins/importexport/datacite/locale/es_ES/common.xml
checking file plugins/importexport/datacite/locale/es_ES/locale.xml
checking file plugins/importexport/datacite/locale/fr_CA/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/datacite/locale/fr_CA/locale.xml
checking file plugins/importexport/datacite/locale/fr_FR/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/datacite/locale/fr_FR/locale.xml
checking file plugins/importexport/datacite/locale/it_IT/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/datacite/locale/it_IT/locale.xml
checking file plugins/importexport/datacite/locale/nl_NL/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/datacite/locale/nl_NL/locale.xml
checking file plugins/importexport/datacite/locale/pt_BR/common.xml
Hunk #1 FAILED at 4.
Hunk #2 FAILED at 28.
2 out of 2 hunks FAILED
checking file plugins/importexport/datacite/locale/pt_BR/locale.xml
checking file plugins/importexport/datacite/locale/pt_PT/common.xml
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED
checking file plugins/importexport/datacite/locale/ru_RU/common.xml
Hunk #1 FAILED at 4.
Hunk #2 FAILED at 64.
2 out of 2 hunks FAILED
checking file plugins/importexport/datacite/locale/ru_RU/locale.xml
checking file plugins/importexport/datacite/locale/sr_SR/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/datacite/locale/sr_SR/locale.xml
checking file plugins/importexport/datacite/locale/tr_TR/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/datacite/locale/tr_TR/locale.xml
checking file plugins/importexport/datacite/locale/uk_UA/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/datacite/locale/uk_UA/locale.xml
checking file plugins/importexport/datacite/locale/zh_CN/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/datacite/locale/zh_CN/locale.xml
checking file plugins/importexport/datacite/scheduledTasks.xml
checking file plugins/importexport/datacite/settings.xml
checking file plugins/importexport/datacite/templates/all.tpl

checking file plugins/importexport/erudit/version.xml
checking file plugins/importexport/medra/classes/DOIExportDom.inc.php
checking file plugins/importexport/medra/classes/DOIExportPlugin.inc.php
checking file plugins/importexport/medra/classes/form/DOIExportSettingsForm.inc.php
Hunk #1 FAILED at 3.
1 out of 1 hunk FAILED
checking file plugins/importexport/medra/classes/form/MedraSettingsForm.inc.php
checking file plugins/importexport/medra/classes/MedraWebservice.inc.php
checking file plugins/importexport/medra/classes/O4DOIExportDom.inc.php
checking file plugins/importexport/medra/classes/O4DOIObjectCache.inc.php
checking file plugins/importexport/medra/classes/PubObjectCache.inc.php
checking file plugins/importexport/medra/index.php
checking file plugins/importexport/medra/locale/ar_IQ/common.xml
checking file plugins/importexport/medra/locale/ar_IQ/locale.xml
checking file plugins/importexport/medra/locale/ca_ES/common.xml
Hunk #1 FAILED at 3.
1 out of 1 hunk FAILED
checking file plugins/importexport/medra/locale/ca_ES/locale.xml
checking file plugins/importexport/medra/locale/cs_CZ/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/medra/locale/cs_CZ/locale.xml
checking file plugins/importexport/medra/locale/da_DK/locale.xml
checking file plugins/importexport/medra/locale/de_DE/common.xml
Hunk #1 FAILED at 4.
Hunk #2 FAILED at 63.
2 out of 2 hunks FAILED
checking file plugins/importexport/medra/locale/de_DE/locale.xml
checking file plugins/importexport/medra/locale/en_US/common.xml
Hunk #1 FAILED at 4.
Hunk #2 FAILED at 63.
2 out of 2 hunks FAILED
checking file plugins/importexport/medra/locale/en_US/locale.xml
checking file plugins/importexport/medra/locale/es_AR/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/medra/locale/es_AR/locale.xml
checking file plugins/importexport/medra/locale/es_ES/common.xml
Hunk #1 FAILED at 3.
1 out of 1 hunk FAILED
checking file plugins/importexport/medra/locale/es_ES/locale.xml
checking file plugins/importexport/medra/locale/fr_CA/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/medra/locale/fr_CA/locale.xml
checking file plugins/importexport/medra/locale/fr_FR/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/medra/locale/fr_FR/locale.xml
checking file plugins/importexport/medra/locale/it_IT/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/medra/locale/it_IT/locale.xml
checking file plugins/importexport/medra/locale/nl_NL/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/medra/locale/nl_NL/locale.xml
checking file plugins/importexport/medra/locale/pt_BR/common.xml
Hunk #1 FAILED at 4.
Hunk #2 FAILED at 28.
2 out of 2 hunks FAILED
checking file plugins/importexport/medra/locale/pt_BR/locale.xml
checking file plugins/importexport/medra/locale/pt_PT/common.xml
Hunk #1 FAILED at 2.
1 out of 1 hunk FAILED
checking file plugins/importexport/medra/locale/ru_RU/common.xml
Hunk #1 FAILED at 4.
Hunk #2 FAILED at 64.
2 out of 2 hunks FAILED
checking file plugins/importexport/medra/locale/ru_RU/locale.xml
checking file plugins/importexport/medra/locale/sr_SR/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/medra/locale/sr_SR/locale.xml
checking file plugins/importexport/medra/locale/tr_TR/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/medra/locale/tr_TR/locale.xml
checking file plugins/importexport/medra/locale/uk_UA/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/medra/locale/uk_UA/locale.xml
checking file plugins/importexport/medra/locale/zh_CN/common.xml
Hunk #1 FAILED at 4.
1 out of 1 hunk FAILED
checking file plugins/importexport/medra/locale/zh_CN/locale.xml
checking file plugins/importexport/medra/MedraExportPlugin.inc.php
checking file plugins/importexport/medra/MedraInfoSender.inc.php

checking file templates/user/subscriptions.tpl
checking file tools/bootstrap.inc.php
checking file tools/copyAccessLogFileTool.php
checking file tools/dbXMLtoSQL.php
checking file tools/deleteSubmissions.php
checking file tools/importExport.php
checking file tools/install.php
checking file tools/mergeUsers.php
checking file tools/poToCountries.php
checking file tools/poToCurrencies.php
checking file tools/rebuildSearchIndex.php
checking file tools/release.sh
checking file tools/runScheduledTasks.php
checking file tools/upgrade.php

Hi @lacris

You do not nee to first update to 2.4.8-3, you can directly upgrade to 3.1.1-4.
S. this document on the upgrade procedure: ojs/UPGRADE at ojs-3_1_1-4 · pkp/ojs · GitHub (If possible, please use the command-line for DB upgrade).

Do not forget to backup everything from your OJS 2 installation!!! – you might need to reconstruct it again.

One thing that crosses my mind that you should consider before starting the upgrade: Do you have supplementary files? – The supplementary files will be migrated as galleys in OJS 3 and thus they will be visible and light accessible for the users/readers. If this is not what you want, there is a patch that you should apply to the OJS 3.1.1-4 code before starting the upgrade, that will migrate the supplementary files as submission files: pkp/pkp-lib#3016 patch not to migrate supp files as galleys but as su… by bozana · Pull Request #2021 · pkp/ojs · GitHub.

Else, note/analyse every output line when doing the command-line DB upgrade – it can contain errors or warnings, that you would need to fix in order to successfully upgrade your installation.

A suggestion: it is good to do and test the upgrade first in an test environment e.g. a test server/installation. Note every step you make. First when you checked that everything in your journal is fine, do the upgrade in production, considering all steps you have noted/taken during the test upgrade.

Best,
Bozana

Good morning @bozana

Thanks you for your directions. I have another question: ¿can I remove the cache directory before doing a test update without problem?
I´m going to copy all: database, filesystem and uploaded_files to have two environments at the same time and doing a grep I see that into the cache directory it has old path references.

Thnaks again!
Cristina

Hi @lacris

Do you want to first copy your 2.4.x installation on another system and run that copy? Is this why you want to clear the cache on the second system?
The cache folder has the following structure:
cache/_db/
cache/t_cache/
cache/t_compile/
cache/t_config/
You can empty those subfolders i.e. delete every other file and folder from the forlder cache and its subfolders, but this subfolders/structure above should remain.

Best,
Bozana

Hi Bozana,

i want to have two environments:

1- 2.4.8 (actual production environment)

2- 3.1.1.-4 development enviroment: starting from the current environment, I update it (from 2.4.8 to 3.1.1-4) and I have the new one to do tests. And when the OJS administrator considers that it is already proven, I will redo the same update process to leave the new version in production.

I hope that in the database there is no reference to the old system (URL or file system).

Thanks again!
Cristina

Hi @lacris

yes, there should be no such references in the DB.

When you get the new 3.1.1-4 code, that you will use for the upgrade, the cache folder should be empty, thus this shouldn’t be the problem… (You would only use the copy of the old 2.4.x files and public folder, as well as the DB dump)

Best,
Bozana

Great bozana,

I´m going to test it! (fingers crossed).

Thank you!!
Cristina

Hello again bozana,

I had to dedicate myself to other issues but now I have resumed the update and I have seen that in the “cache” folder there are two other folders called HTML and URI.

What do I do with those two folders? Must I delete or leave them?

Thank you very much!
Cristina

Hi @lacris

You can delete them to clear the cache: rm -r HTML and rm -r URI.

Best,
Bozana

Hello again @bozana

I’m reviewing the directives of he config.inc.php file and I see that the “encryption” one, in the TEMPLATE file, has the sha1 value. But in my old system, it had md5.

Should I put the same value I had so that there were no problems with the existing passwords or is the system able to test both algorithms when an old user is going to login?

Thanks again!!
Cristina

Hi @lacris

Please use the same encryption as in OJS 2 i.e. md5.
(This option is deprecated, but still provided so that journal’s passwords can all migrated to the new system…)

Best,
Bozana

Great!

I am finishing configuring the config file.
I almost have it!

Another question: can I write into an specific file the output of the debug mode instead instead of the output being displayed in the browser?

thank you very much!

Cristina

Hi @bozana

I´m trying to do the upgrade but if I try by web browser it displays “execute(); ?>”
If I try by the command line with "php tools/upgrade.php upgrade "
It remains unanswered for indefinite time.

Is there any way to see what is happening?

Thank you very much!
Cristina

hello again!

I have managed to get errors/messages through the command line.

Is there any incompatibility of OJS 3 with PHP 7.0.32??

As I read I use config.inc.php:driver = mysqli

This is which it shows:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Smarty has a deprecated constructor in /Nwww/web/servicios/sp/ojs-3.1.1-4/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 64

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; dbObject has a deprecated constructor in /Nwww/web/servicios/sp/ojs-3.1.1-4/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 106

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; dbTable has a deprecated constructor in /Nwww/web/servicios/sp/ojs-3.1.1-4/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 205

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; dbIndex has a deprecated constructor in /Nwww/web/servicios/sp/ojs-3.1.1-4/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 613

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; dbData has a deprecated constructor in /Nwww/web/servicios/sp/ojs-3.1.1-4/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 774

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; dbQuerySet has a deprecated constructor in /Nwww/web/servicios/sp/ojs-3.1.1-4/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 959

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; adoSchema has a deprecated constructor in /Nwww/web/servicios/sp/ojs-3.1.1-4/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 1217

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /Nwww/web/servicios/sp/ojs-3.1.1-4/lib/pkp/lib/adodb/adodb.inc.php on line 263

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /Nwww/web/servicios/sp/ojs-3.1.1-4/lib/pkp/lib/adodb/adodb.inc.php on line 359

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /Nwww/web/servicios/sp/ojs-3.1.1-4/lib/pkp/lib/adodb/adodb.inc.php on line 2921

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /Nwww/web/servicios/sp/ojs-3.1.1-4/lib/pkp/lib/adodb/adodb.inc.php on line 3939

And the update does not continue. Well, I get bored and I cancel it

Any help would be appreciate! Thanks!!

Cristina

Hi @lacris

Those are just warnings – you can set your server php logging not to show the deprecated and strict standard warnings (you can search for a solution on that in the forum or internet) – important are the php fatal errors or upgrade warnings that you will then also see when running via the command line.
When you try the upgrade anew, please do not forget to restore your full backup…

Best,
Bozana

Hello @bozana

I´m desolated. :frowning: After typing php tools/upgrade.php upgrade nothing happens. I´ve waiting for hours. Nothing.

In a test I did some months ago, with the ojs-3.1.0-1 I had no such problems. Unfortunately I deleted all that tests.

I have a question: the parameter
OAI Repository identifier “repository_id” must be the same that it was in the old config of the ojs 2.4.8 or it has to be different?

Thank you for all your help!
Cristina

Hi @lacris,

Hmmm… that is strange…
Could you please run the command slightly differently, e.g.:
php tools/upgrade.php check
or just
php tools/upgrade.php

The repository_id can be different for the upgrade – it will then later just matter if a service provider has been harvesting your journal(s) via OAI – there will be the ID change…

Best,
Bozana

Hi @bozana!,

Wait! I have seen that may be the Captcha!! I´m going to test again (but later because now I have a reunión).

Thanks!
Cristina

@bozana

SOLVED!!!

I re-copied the file ojs files_upload, the public dir and the database and run again
php tools/upgrade upgrade

and after a lot of warnings, I succesfully upgrade from ojs 2.4.8 and php 5.3 to ojs 3.1.1.1-4 and php7.0
Now, if I run php tools/upgrade check, it shows:

Code version: 3.1.1.4
Database version: 3.1.1.4
Latest version: 3.1.1.4
Your system is up-to-date

Thanks again for your help, your patience and your time!
Best regards!

Cristina