Upgrade OJS-DB from very old version?

Hi
we got an old version 2.2.2 of OJS with a lot of data. Unfortunately I can not upgrade step by step, because the old versions require <php5.6.
Is there a way to fill in the data into OJS V3.0.2 directly?
Thanks
Andreas

What specific servers are you working with? For example: one server with PHP 5.3 is running OJS 2.2.2; and another server has PHP7 and you want to run OJS 3.0.2.

If you are running OJS 2.2.2 on PHP 5.x, you can probably copy the files and database to the same server and then upgrade to OJS 3.0.2, then move OJS 3.0.2 to your new PHP7 server.

Thanks for helping!
I have tried a lot:

  • run OJS 2.2.2 with PHP5.6 this works, if I do no new Install. If I try to run Install a lot of errors are shown.
  • apply the OJS-patch to the OJS 2.2.2 files on my lokal harddisk. But patch.exe (Windows) would not do anything. (I reformatted the patch with \r\n for Windows)
  • copy OJS 2.4.8 over 2.2.2. But due to PHP5.6 OJS-Install runs in error.
  • installed OJS 3.0.2 with new DB. That runs fine :slight_smile:
  • import OJS2.2.2 xml-Issues to OJS 3.0.2 but that is not possible see: Import XML
  • now we think, we have to go the long way: Apache with PHP4.x in a sandbox and step for step upgrading.
    It could be easier…

OJS 2.2.2 is quite old and definitely pre-dates me, but based on the documentation, I would expect both OJS 2.2.2 and OJS 3.0.2 to run under PHP 5.6.

I wouldn’t recommend the patch method of upgrading, but upgrading 2.2.2 to 2.4.8 via the Full Package method should be supported.

If you would like to share the error messages which are blocking your upgrade, we may be able to offer assistance.

Thank you for your answer.
I went the long way:

  • XAMPP on localhost (Win 10)
  • OJS2.2.2 installed (it works)
  • Patch installed 2.2.2. => 2.4.8 with some -R warnings. OJS still works (but shows 2.2.2 as version)
  • OJS3.0.2 installed in a new directory: Error 500 but NO entry in the Error-Log! (I wrote a fake err-msg via php error_log(…) to be sure, that the config is ok.)

The error is raised in the constructor of Core/Application.inc.php in line 38: parent::__construct();
No idea to go further…

I’ve seen instances where there was no message in the error log if PHP was built without support for the database driver chosen.

Note especially that old version of PHP may have run with the “mysql” database driver, but new versions of PHP may require the use of the “mysqli” driver.

Hi @Heertsch,

Note that patching your installation is only half of the upgrade process – you also need to upgrade your database. If OJS still reports the old version despite running on the new codebase, it’s likely that you either didn’t run the database upgrade or that it didn’t complete fully.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks for your help.
This is my way to success (of upgrading)

  • on local XAMP with php4.x: Install the master OJS 2.2.2 (with data and DB)
  • load OJS 2.3.6 in a separate directory (no, we can’t go to 2.4.8 directly)
  • copy ‘files’ and ‘public’ into this directory
  • set ‘installed = Off’ in config.inc.php
  • upgrade to DB via install
  • move DB to web-hoster with PHP5.x
  • download and copy OJS 2.4.8 into directory on your web-hoster
  • install and upgrade DB to OJS 2.4.8 via install
  • download and copy OJS 3.0.2 into an other directory on your web-hoster
  • install and upgrade DB to 3.0.2 via install
    I did not use any of the patches.
    Now it works

Hi @Heertsch,

Glad to hear you got this going. It should be possible to go directly from 2.2.2 to 2.4.8, I think, but because that’s such an old release it’s possible that an upgrade across so many versions isn’t frequently tested. Do you have an error message you encountered during that process?

Regards,
Alec Smecher
Public Knowledge Project Team

if you miss to upgrade the DB to 2.3.6 you get an error in the DB like:
DB Error: Duplicate entry 'interest-4096-90' for key 'controlled_vocab_symbolic'
See Upgrading OJS 2.2.3 to 2.4.6
Greetings from Switzerland
Andreas

Hi @Heertsch,

Ah, I see. Because OJS 2.2.x so old I suspect a fix will be sufficiently low priority that it’ll be a moot point by the time a developer comes to it – so for the moment I suggest the work-around you’ve already discovered, which is to perform an intermediate upgrade if needed. For OJS 2.3 onwards, I think this won’t be an issue.

Regards,
Alec Smecher
Public Knowledge Project Team