Upgrade from ojs 2.4.8.2 to ojs 3.1.1-2 Failed

Hello [php 5.6.35, Mysql 5.7.21, Apache 2.4.33]
I tried today to upgrade my ojs 2.4.8.2 installation to ojs 3.1.1-2. using the classic method (Replacing the current OJS directory with the new OJS directory and then filling the configuration file config.inc.php with the correct parameters)
I enabled the display of errors. This is an example of errors I got :

Strict standards: Declaration of AnnouncementFeedPlugin::register() should be compatible with LazyLoadPlugin::register($category, $path, $mainContextId = NULL) in E:\wamp64\www\revue\plugins\generic\announcementFeed\AnnouncementFeedPlugin.inc.php on line 148

Strict standards: Declaration of AnnouncementFeedPlugin::manage() should be compatible with Plugin::manage($args, $request) in E:\wamp64\www\revue\plugins\generic\announcementFeed\AnnouncementFeedPlugin.inc.php on line 148

Deprecated: Assigning the return value of new by reference is deprecated in E:\wamp64\www\revue\plugins\generic\booksForReview\BooksForReviewPlugin.inc.php on line 41

Strict standards: Declaration of DataversePackager::addFile() should be compatible with PackagerAtomTwoStep::addFile($sac_thefile) in E:\wamp64\www\revue\plugins\generic\dataverse\classes\DataversePackager.inc.php on line 17

Fatal error: Call to undefined method GenericPlugin::GenericPlugin() in E:\wamp64\www\revue\plugins\generic\lucene\LucenePlugin.inc.php on line 50

Anyone has an idea please ???

Hi @azzedine

Did you use the ojs-3.1.1-2 tar package?
You should not replace the old ojs folder with the new, but use a new folder for 3.1.1-2 or remove the old and take the clean 3.1.1-2 code. It seems like you still have some old code there – Lucene plugin does not exist in 3.1.1-2 any more.
Thus it would be best to:

  1. backup everything from 2.4.8.2: files folder, public folder, config.inc.php, DB dump!!!
  2. unpack the ojs-3.1.1-2 tar package in a new folder
  3. copy the public folder to the new ojs folder, eventually copy the 2.4.8 files folder to the right location, create a new, clean DB and apply the 2.4.8 dump on it, adapt the new config.inc.php.
  4. start the upgrade via CLI, using the command “php tools/upgrade.php upgrade”.

Every time you start a new upgrade attempt, you would need to do all the steps 3. and 4. again – an upgrade attempt moves the files and changes the DB, so that they could be wrong when starting a new upgrade – they always need to be as in the original 2.4.8 installation.

Best,
Bozana

@bozana
First I want to thank you for the quick answer.
Yes I used the tar ojs-3.1.1-2 and replaced the current ojs 2.4.8 installation as described in the UPGRADE file in docs folder.
Now I tried to :
1- backup the public folder and config.inc.php
2- remove all the files of the current installation folder
3- unpack the ojs-3.1.1-2 tar package in a same folder
4- create a new database and import the dump of the 2.4.8 mysql database
5- copy the public folder to the right location and adjust the config file with the right parameters.
6- start the upgrade via command line using the command : php tools/upgrade.php upgrade
and saved the command results to file result.txt

unfortunately the upgrade failed again.
Here is a public link to the “result.txt” file :
https://docs.google.com/document/d/1FDEv1jEBqV21F3Al_0DUpIDunn_SBFrw8l8h6wgF5k4/edit?usp=sharing

if you have an idea, thank you to share with me your experience.

Hi @azzedine

Those notices "unserialize(): Error at offset … of … bytes in " suggest that your character set configuration has changed – double-check that your new and old databases have the same encodings, and that your config.inc.php character set options match your old 2.x installation.

If you search after that message in the forum, you will find several posts and answers…

Best,
Bozana