Unable to upgrade from 2.4.5 to 3.0.2

Hello,
I’m very new to OJS, but I’ve been asked to upgrade an instance of OJS from 2.4.5.0 to 3.0.2. Off course first thing was to make a full backup and setup the site in a different server to do the testing.
I’m not aware if there are modifications in the code from standard 2.4.5, so I ran a command I found in documentation, between the existing 2.4.5 instance and the uncompressed full package of the same version

diff -u /path/stock-ojs-2.4.5 /path/modified-ojs-2.4.5-install > mods.diff

The only differences found were in config.inc.php file, although I’m not sure if that command also compared files inside sub-folders.
I deleted all folders except public (and the file_dir), copied the database details into the new config.inc.php (from version 3.0.2) and uploaded the new files and folders in the host. The installer loaded and gave me the option to upgrade, which I did, but it ended with the following error message:

There are no readable files in this directory tree. Are safe mode or open_basedir active?

I restored DB and files to 2.4.5, and found another post that hinted there might be a problem with the database having articles without assigned categories. But the recommended query:

select * from articles where section_id is null;
didn’t return any matches.

After that, my boss did several attempts to upgrade, although I don’t have many details of the errors he got, but I know he managed to upgrade from 2.4.5 to 2.4.8, and then failed to upgrade from 2.4.8 to 3.0.2

So finally I installed xampp on my computer, set it up to allow scripts to run for up to 5 minutes, installed the site and attempted to upgrade, however again I failed. I checked the logs, and this is what I found (I removed the Strict and Deprecated warnings):

[Sat May 20 02:02:06.100068 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Warning: Cannot use a scalar value as an array in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\core\DataObject.inc.php on line 133, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:06.101069 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 98 of 335 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:06.101069 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 99 of 176 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:06.101069 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 54 of 1273 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:06.102069 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 307 of 1022 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:06.129070 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Warning: Cannot use a scalar value as an array in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\SettingsDAO.inc.php on line 41, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:06.130070 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 98 of 335 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:06.130070 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 99 of 176 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:06.130070 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 54 of 1273 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:06.130070 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 307 of 1022 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:06.185073 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Strict Standards: Declaration of SubmissionDisciplineEntryDAO::getByControlledVocabId() should be compatible with ControlledVocabEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL, $filter = NULL) in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\submission\SubmissionDisciplineEntryDAO.inc.php on line 20, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:06.226076 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Strict Standards: Declaration of SubmissionSubjectEntryDAO::getByControlledVocabId() should be compatible with ControlledVocabEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL, $filter = NULL) in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\submission\SubmissionSubjectEntryDAO.inc.php on line 50, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:06.241077 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Strict Standards: Declaration of SubmissionAgencyEntryDAO::getByControlledVocabId() should be compatible with ControlledVocabEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL, $filter = NULL) in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\submission\SubmissionAgencyEntryDAO.inc.php on line 50, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:06.256077 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Strict Standards: Declaration of SubmissionLanguageEntryDAO::getByControlledVocabId() should be compatible with ControlledVocabEntryDAO::getByControlledVocabId($controlledVocabId, $rangeInfo = NULL, $filter = NULL) in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\submission\SubmissionLanguageEntryDAO.inc.php on line 52, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:14.021522 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Warning: Cannot use a scalar value as an array in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\core\DataObject.inc.php on line 133, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:14.023522 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 98 of 335 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:14.023522 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 99 of 176 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:14.024522 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 54 of 1273 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:02:14.025522 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 307 of 1022 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:48.446922 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 87 of 170 bytes in E:\xampp\htdocs\summapsicologica\classes\install\Upgrade.inc.php on line 698, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:48.446922 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Warning: Invalid argument supplied for foreach() in E:\xampp\htdocs\summapsicologica\classes\install\Upgrade.inc.php on line 700, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:48.448922 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 97 of 393 bytes in E:\xampp\htdocs\summapsicologica\classes\install\Upgrade.inc.php on line 698, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:48.448922 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Warning: Invalid argument supplied for foreach() in E:\xampp\htdocs\summapsicologica\classes\install\Upgrade.inc.php on line 700, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:48.459923 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 97 of 393 bytes in E:\xampp\htdocs\summapsicologica\classes\install\Upgrade.inc.php on line 698, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:48.460923 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Warning: Invalid argument supplied for foreach() in E:\xampp\htdocs\summapsicologica\classes\install\Upgrade.inc.php on line 700, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:48.463923 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 87 of 170 bytes in E:\xampp\htdocs\summapsicologica\classes\install\Upgrade.inc.php on line 698, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:48.463923 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Warning: Invalid argument supplied for foreach() in E:\xampp\htdocs\summapsicologica\classes\install\Upgrade.inc.php on line 700, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:48.471924 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 97 of 606 bytes in E:\xampp\htdocs\summapsicologica\classes\install\Upgrade.inc.php on line 698, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:48.471924 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Warning: Invalid argument supplied for foreach() in E:\xampp\htdocs\summapsicologica\classes\install\Upgrade.inc.php on line 700, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:48.479924 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 97 of 606 bytes in E:\xampp\htdocs\summapsicologica\classes\install\Upgrade.inc.php on line 698, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:48.479924 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Warning: Invalid argument supplied for foreach() in E:\xampp\htdocs\summapsicologica\classes\install\Upgrade.inc.php on line 700, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:48.481924 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 97 of 393 bytes in E:\xampp\htdocs\summapsicologica\classes\install\Upgrade.inc.php on line 698, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:48.481924 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Warning: Invalid argument supplied for foreach() in E:\xampp\htdocs\summapsicologica\classes\install\Upgrade.inc.php on line 700, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:49.154963 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Warning: Cannot use a scalar value as an array in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\core\DataObject.inc.php on line 133, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:49.154963 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 98 of 335 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:49.154963 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 99 of 176 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:49.155963 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 54 of 1273 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:49.155963 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 307 of 1022 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:49.158963 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Warning: Cannot use a scalar value as an array in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\SettingsDAO.inc.php on line 41, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:49.159963 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 98 of 335 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:49.159963 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 99 of 176 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:49.159963 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 54 of 1273 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:49.159963 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 307 of 1022 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:49.463981 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Warning: Cannot use a scalar value as an array in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\core\DataObject.inc.php on line 133, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:49.463981 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 98 of 335 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:49.463981 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 99 of 176 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:49.464981 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 54 of 1273 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:03:49.464981 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 307 of 1022 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:08:41.159665 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Warning: Cannot use a scalar value as an array in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\core\DataObject.inc.php on line 133, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:08:41.160665 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 98 of 335 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:08:41.160665 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 99 of 176 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:08:41.160665 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 54 of 1273 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:08:41.160665 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 307 of 1022 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:08:57.503599 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Warning: Cannot use a scalar value as an array in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\core\DataObject.inc.php on line 133, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:08:57.504599 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 98 of 335 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:08:57.504599 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 99 of 176 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:08:57.506600 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 54 of 1273 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:08:57.507600 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Notice: unserialize(): Error at offset 307 of 1022 bytes in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\db\DAO.inc.php on line 347, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:09:05.522058 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] PHP Warning: assert(): Assertion failed in E:\xampp\htdocs\summapsicologica\lib\pkp\classes\submission\PKPSubmissionFileDAO.inc.php on line 380, referer: http://localhost/summapsicologica/index.php/index/install/upgrade
[Sat May 20 02:09:05.522058 2017] [:error] [pid 49460:tid 2016] [client ::1:61968] ojs2: There are no readable files in this directory tree. Are safe mode or open_basedir active?, referer: http://localhost/summapsicologica/index.php/index/install/upgrade

And at this point, both my boss and me are out of ideas and have no choice but to ask for help here.

Also, I have another problem: the hosting provider for the live site recently has installed SUHOSIN, and now the users of the journal are getting error messages about EVAL() function being blocked, and the provider’s answer to our complaint was “you need to upgrade your Joomla or Wordpress to a newer version” (IMHO, we need to migrate to a provider that at least read the requests and realize we are not talking about Joomla or Wordpress). Anyway, now it is important to upgrade to a version of OJS that doesn’t rely on EVAL() function. Would 2.4.8 be sufficient for that purpose, or branch 3.x is our only option?

Best Regards

1 Like

Hi @jfernandez,

Check to make sure you haven’t inadvertently changed your character set configuration options in config.inc.php in running the upgrade; that should clear up the unserialize messages and make your error log much more readable.

The eval function is used a few times in the OJS codebase, primarily in third-party libraries that we rely upon such as Smarty and HTML Purifier. I don’t believe we rely upon eval heavily, either in OJS or in the parts of those third-party libraries that we use. OJS 2.x and 3.x have similar requirements with respect to this function. It is not a security risk in and of itself, though insecure software sometimes exposes an attack surface through careless use of the function.

Regards,
Alec Smecher
Public Knowledge Project Team