Migrating OJS 2.4 on Windows to OJS3 on Linux

We currently have the old, unsupported upgrade path version 2.4 on an old Windows box, and would like to migrate it to OJS3 on a RHEL7 Linux server. I’ve seen a lot of discussions about going from 2.0 to 2.4, then to 3, but nothing about changing platforms in conjunction with an upgrade to OJS3.

Is there any recommended path for this? Has anyone successfully pulled this off?

Hi @russellj,

What version of PHP is your old Windows box running? That may determine the options.

Regards,
Alec Smecher
Public Knowledge Project Team

Alec,

My apologies, it is actually OJS2.4 so that seemingly removes 1 step of complexity, but the operating system needs to change. The current, fuller picture is:

Windows 2003 server (end of life)
OJS 2.4
MySQL 5.5
PHP 5

We would like to take that to the latest OJS3 preferably on RHEL7, or Windows Server 2012 if migrating to a Linux is beyond the realm of possibility.

Hi @russellj,

What specific version of PHP5 are you using? If it’s older than 5.6, then you’ll need to run the upgrade on the new machine. If it’s 5.6 or newer, then you can perform the upgrade on either machine. I’d suggest running it in the environment you’re most comfortable with.

Regards,
Alec Smecher
Public Knowledge Project Team

Alec, sincere apologies for missing your reply in an attempt to help. To make matters worse, it was actually OJS version 2.3.3.2 on the old Windows 2003 box, so I did have an additional upgrade step to 2.4 to pull this off. Anyway, in case it helps anyone that sees this in the future, my basic steps to accomplish this ended up being:

  1. Spin up the RHEL7 LAMP stack with:
    Apache 2.4.6, PHP 5.6.37, and installed MySQL 5.5 to match the MySQL the old Windows 2003 server, using the 5.5 manually installed .rpm packages

  2. Install OJS 2.3.3.2 on RHEL server to match the version installed on Windows 2003, despite the version being incompatible with this level of PHP - certain features like the entire journal manager did not work, but knew I would be moving past this version anyway, a gamble but ended up working

  3. Take MySQLdump of Windows 2003 server OJS database and import in to OJS database on matching version level in RHEL server

  4. Copy OJS files directory in the same folder structure style as on Windows 2003 and point config.inc.php to it

  5. Configured config.inc.php to match old Windows 2003 OJS configuration

I then had a semi-functioning OJS 2.3.3.2 on a new RHEL server.

  1. Used the .patch instructions to bring 2.3.3.2 to 2.4.8.3:
    patch -p1< ojs-2.3.3-2_to_2.4.8-3.patch
    Set Installed=Off
    php tools/upgrade.php upgrade

Now since 2.4.8.3 is compatible with the level of PHP I left on it, I had a fully functioning 2.4.8.3 on my Linux box with valid OJS data from the Windows 2003 box.

  1. Extracted tar -zxf ojs-3.1.1-2.tar.gz to a subfolder of my current OJS directory. I did not copy my 2.4.8.3 config.inc.php to it and instead reconfigured the new one in the 3.1.1-2 subfolder manually, pointing it to my 2.4.8.3 database and files.

  2. From this 3.1.1-2 subfolder I ran after setting Installed=Off:
    php tools/upgrade.php upgrade

This failed several times with “invalid file”, resetting the database back to a fresh copy of my 2.4.8.3 database after each failed attempt (drop database ojs; create database ojs; mysql ojs < ojs.sql)

  1. Had to manually perform the following fix to the file classes/install/Upgrade.inc.php at this git link:
  1. Then I was able to run php tools/upgrade.php upgrade without error and got:

Successfully upgraded to version 3.1.1-2

  1. Removed entire contents of the OJS 2.4.8.3 folder and moved contents of my 3.1.1-2 subfolder to my planned parent OJS folder where 2.4.8.3 was

So far, it seems like a solid OJS 3.1.1-2 install w/ correct data.