Unable to upgrade to OJS 3

THIS IS AN OLDER PROBLEM, but I finally have the time (and the IT help to get it solved) so I am posting a fresh discussion with a bit more information

Here’s the situation. We have an ojs site with one active journal and one dormant journal. Both have some content (< 40 articles each). The OJS version running is OJS 2.4.7.1.
I had the server and the database cloned by our IT folks to create a “test” version.

I installed 3.0.2 back in late November, followed the upgrade instructions carefully and then ran php tools/upgrade.php upgrade.
It seems as though it went okay, but when I went to the page for the active journal, I found several issues. One was that the public displayed included all the files associated with an article and not just the final arcticle and I also noticed that users for that journal don’t show up either.

After a lot of procrastination on my part, I would like to move our production site to OJS 3, but I’m reluctant to upgrade it until I figure out why the test upgrade didn’t work.

My suspicion is that the problems I am seeing are most likely a database issue.

Here are the issues I’ve noticed (PHP version, a MySQL snippet, and a upgrade output text all follow:

==================================================================
OJS 3 documentation indicates that PHP 5.3.7 or higher is required.
Unfortunately PHP 5.3.3 is still the latest PHP “officially” default supported by RedHat in RedHat Enterprise 6.
Is this going to cause problems?
Our University IT staff really want us to avoid using something that isn’t part of the default.

From the DB admin:
Below are the query results in production.
In production I don’t see the anomaly with “navItems” setting.

mysql> SELECT DISTINCT s1.setting_name FROM journal_settings s1, journal_settings s2 WHERE s1.setting_name = s2.setting_name AND s1.locale = ‘’ AND s2.locale <> ‘’;
±-----------------+
| setting_name |
±-----------------+
| metaCitations |
±-----------------+
1 row in set (0.03 sec)
mysql>

mysql> select * from journal_settings where setting_name=‘metaCitations’;
±-----------±---------±------------------±------------±------------+
| journal_id | locale | setting_name |setting_value |setting_type |
±-----------±---------±------------------±------------±------------+
| 8 | en_US | metaCitations | 1 | string |
| 9 | | metaCitations | 1 | bool |
| 9 | en_US | metaCitations | 1 | string |
| 10 | | metaCitations | 1 | bool |
| 10 | en_US | metaCitations | 1 | string |
±-----------±---------±------------------±------------±------------+
5 rows in set (0.00 sec)
mysql>

[ojs@ojs-test ojs-3.0.2]$ php tools/upgrade.php upgrade

[pre-install]
[load: upgrade.xml]
[version: 3.0.2.0]

[code: Installer Installer::syncSeriesAssocType]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_preupdate_usageStatistics2.xml]
[data: dbscripts/xml/upgrade/3.0.0_preupdate.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptTimedViews.xml (skipped)]
[data: dbscripts/xml/upgrade/3.0.0_adaptReferrals.xml]
[data: dbscripts/xml/upgrade/3.0.0_adaptBooksForReview.xml]
[data: dbscripts/xml/upgrade/remove_timed_views_bots.xml (skipped)]

[code: Installer Installer::migrateCounterPluginUsageStatistics (skipped)]

[code: Installer Installer::migrateTimedViewsUsageStatistics (skipped)]

[code: Installer Installer::migrateDefaultUsageStatistics (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postUsageStatsMigration.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postUsageStatsMigration2.xml]
[data: dbscripts/xml/upgrade/2.4.0_postCounterMigration.xml (skipped)]
[data: dbscripts/xml/upgrade/2.4.0_postTimedViewsMigration.xml (skipped)]
[data: dbscripts/xml/upgrade/3.0.0_preupdate_commentsToEditor.xml]
[schema: lib/pkp/xml/schema/common.xml]
[schema: lib/pkp/xml/schema/log.xml]
[schema: lib/pkp/xml/schema/announcements.xml]
[schema: lib/pkp/xml/schema/scheduledTasks.xml]
[schema: lib/pkp/xml/schema/temporaryFiles.xml]
[schema: lib/pkp/xml/schema/metadata.xml]
[schema: lib/pkp/xml/schema/reviews.xml]
[schema: lib/pkp/xml/schema/reviewForms.xml]
[schema: lib/pkp/xml/schema/controlledVocab.xml]
[schema: lib/pkp/xml/schema/submissions.xml]
[schema: lib/pkp/xml/schema/submissionFiles.xml]
[schema: lib/pkp/xml/schema/notes.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/genres.xml]
[schema: lib/pkp/xml/schema/gifts.xml]
[schema: lib/pkp/xml/schema/mutex.xml]
[schema: lib/pkp/xml/schema/tombstone.xml]
[schema: lib/pkp/xml/schema/rolesAndUserGroups.xml]
[schema: lib/pkp/xml/schema/metrics.xml]
[schema: lib/pkp/xml/schema/views.xml]
[schema: lib/pkp/xml/schema/libraryFiles.xml]
[schema: dbscripts/xml/ojs_schema.xml]
[data: dbscripts/xml/indexes.xml]
[data: dbscripts/xml/upgrade/3.0.0_change_assoc_type.xml]
[data: dbscripts/xml/upgrade/3.0.0_change_assoc_type_metrics.xml]
[data: dbscripts/xml/upgrade/3.0.0_settings.xml]

[code: Installer Installer::migrateArticleMetadata]
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Notice: unserialize(): Error at offset 1511 of 1810 bytes in /webapps/ojs-3.0.2/lib/pkp/classes/db/DAO.inc.php on line 347
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
PHP Notice: unserialize(): Error at offset 1511 of 1810 bytes in /webapps/ojs-3.0.2/lib/pkp/classes/db/DAO.inc.php on line 347
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
[data: dbscripts/xml/upgrade/3.0.0_update.xml]

[code: Installer Installer::clearDataCache]

[code: Installer Installer::migrateUserRoles]
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Notice: unserialize(): Error at offset 1511 of 1810 bytes in /webapps/ojs-3.0.2/lib/pkp/classes/db/DAO.inc.php on line 347
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133

[code: Installer Installer::installDefaultGenres]

[code: Installer Installer::fixReviewForms]

[code: Installer Installer::htmlifyEmailTemplates]
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Notice: unserialize(): Error at offset 1511 of 1810 bytes in /webapps/ojs-3.0.2/lib/pkp/classes/db/DAO.inc.php on line 347
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
PHP Notice: unserialize(): Error at offset 1511 of 1810 bytes in /webapps/ojs-3.0.2/lib/pkp/classes/db/DAO.inc.php on line 347
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/db/SettingsDAO.inc.php on line 41
[note: docs/release-notes/README-BEACON]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]

[code: Installer Installer::installEmailTemplate]
[data: dbscripts/xml/upgrade/3.0.0_scheduledTasks.xml]

[code: Installer Installer::localizeCustomBlockSettings]
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Notice: unserialize(): Error at offset 1511 of 1810 bytes in /webapps/ojs-3.0.2/lib/pkp/classes/db/DAO.inc.php on line 347
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133

[code: Installer Installer::convertEditorDecisionNotes]

[code: Installer Installer::convertQueries]

[code: Installer Installer::migrateFiles]
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Notice: unserialize(): Error at offset 1511 of 1810 bytes in /webapps/ojs-3.0.2/lib/pkp/classes/db/DAO.inc.php on line 347
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133

[code: Installer Installer::convertSupplementaryFiles]
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Notice: unserialize(): Error at offset 1511 of 1810 bytes in /webapps/ojs-3.0.2/lib/pkp/classes/db/DAO.inc.php on line 347

[code: Installer Installer::setFileUploader]
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Notice: unserialize(): Error at offset 1511 of 1810 bytes in /webapps/ojs-3.0.2/lib/pkp/classes/db/DAO.inc.php on line 347
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133

[code: Installer Installer::setFileName]
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133
PHP Notice: unserialize(): Error at offset 1511 of 1810 bytes in /webapps/ojs-3.0.2/lib/pkp/classes/db/DAO.inc.php on line 347
PHP Warning: Cannot use a scalar value as an array in /webapps/ojs-3.0.2/lib/pkp/classes/core/DataObject.inc.php on line 133
[data: dbscripts/xml/upgrade/3.0.0_postupdate.xml]
[data: dbscripts/xml/upgrade/3.0.0_pubId_settings.xml]
[data: dbscripts/xml/upgrade/3.0.0_postupgrade_galley_files.xml]
[data: dbscripts/xml/upgrade/3.0.0_postupgrade_metrics.xml]
[data: dbscripts/xml/upgrade/3.0.0_issue_settings.xml]
[data: dbscripts/xml/upgrade/3.0.0_submission_settings.xml]
[data: dbscripts/xml/upgrade/3.0.0_review_method.xml]
[data: dbscripts/xml/upgrade/3.0.0_edit_decisions.xml]

[code: Installer Installer::convertCommentsToEditor]
[note: docs/release-notes/README-3.0]
[note: docs/release-notes/README-3.0.1]
[data: dbscripts/xml/upgrade/3.0.2_update.xml]
[note: docs/release-notes/README-3.0.2]

[code: Installer Installer::addPluginVersions]
[post-install]

Hi @Richard,

On PHP versions, the current OJS 3.x release requires at least PHP 5.6, and even that will only will get security fixes until the end of the year. See http://php.net/supported-versions.php for information on currently-supported PHP versions. Anything not on that chart should be considered unsafe to use.

Regards,
Alec Smecher
Public Knowledge Project Team

Alec,

Thanks. The server admins went ahead and upgraded to php 7.
My other question concerns the database. I suspect there are some issues and I need enough info to discuss what might be wrong with the db admin. She did run one report and it yielded the following;

mysql> SELECT DISTINCT s1.setting_name FROM journal_settings s1, journal_settings s2 WHERE s1.setting_name = s2.setting_name AND s1.locale = ‘’ AND s2.locale <> ‘’;
±----------------+
| setting_name |
±----------------+
| metaCitations |
±----------------+
1 row in set (0.03 sec)
mysql>
mysql> select * from journal_settings where setting_name=‘metaCitations’;
±----------±--------±-----------------±-----------±-----------+
| journal_id | locale | setting_name |setting_value |setting_type |
±----------±--------±-----------------±-----------±-----------+
| 8 | en_US | metaCitations | 1 | string |
| 9 | | metaCitations | 1 | bool |
| 9 | en_US | metaCitations | 1 | string |
| 10 | | metaCitations | 1 | bool |
| 10 | en_US | metaCitations | 1 | string |
±----------±--------±-----------------±-----------±-----------+
5 rows in set (0.00 sec)
What else can or should we do to check the health of the db?

Hi @Richard,

Glad to hear the PHP version issue is resolved.

I’d recommend deleting that metaCitations setting – it’ll cause warnings, but nothing more that, and there’s no harm in removing it entirely.

Otherwise, I’d recommend making a full backup of your installation and trying the upgrade!

Regards,
Alec Smecher
Public Knowledge Project Team