Php 8.0 and 8.1 released

Description of issue or problem I’m having:
Is it safe to upgrade php version 8 or 8.1 since my hosting forcing me to do that

Steps I took leading up to the issue:
I tried to change to version 8.0 but site stopped working

What I tried to resolve the issue:
No work around seen

Application Version - e.g., OJS 3.3.0:7

Additional information, such as screenshots and error log messages if applicable:
Nothing

Hi @doneforyou

As far as I know, OJS 3.4 and maybe 3.3.0.9 will be compatible with PHP8, but they aren’t officially released yet.

Best
Jason

1 Like

@jnugent when we can expect official release? Also may I know the key features of upcoming versions

@doneforyou I don’t have a list of 3.4 features handy, but 3.4 is due out in “second quarter 2022”. I’m also not sure when 3.3.0.9 will come out, but probably soon.

Hi @doneforyou,

OJS 3.3.0-9 will be released within the next week or two, and should be compatible with PHP 8.0. OJS 3.4.0 is scheduled for the second quarter of this year, but might slip a little from there, and should be compatible with PHP 8.1.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

@asmecher thanks, since I am using 3.3.0.7, what are the beat stepa to move to 3.3.0.9?

Hi @doneforyou,

OJS 3.3.0-7 and 3.3.0-9 will be “database-compatible”, so you should be able to just update the code. There is comprehensive upgrade documentation here:

However, I’m not personally aware of any reason that 3.3.0-7 would simply stop working with PHP 8.0; our testing environment for 3.3.0-7 includes PHP 8.0. You might find that if you check the PHP error log there is a simple reason for the failure there.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

@asmecher In error.log I am not seeing any error but I will recheck again, possible the other installed plugin may have the issue…

@asmecher Also good to jump from 3.3.0.7 to 3.3.0.9 directly?

Hi @doneforyou,

Yes, you can jump directly.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher here is error log when I turn on php 8.0

[20-Feb-2022 00:23:20 America/Boise] PHP Fatal error: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, string given in /home2/marshal/public_html/marsh/lib/pkp/classes/core/DataObject.inc.php:65
Stack trace:
#0 /home2/marshal/public_html/marsh/lib/pkp/classes/core/DataObject.inc.php(65): array_keys(‘Journal of Marshal …’)
#1 /home2/marshal/public_html/marsh/lib/pkp/classes/site/Site.inc.php(64): DataObject->getLocalizedData(‘title’)
#2 /home2/marshal/public_html/marsh/lib/pkp/classes/template/PKPTemplateManager.inc.php(150): Site->getLocalizedTitle()
#3 /home2/marshal/public_html/marsh/classes/template/TemplateManager.inc.php(28): PKPTemplateManager->initialize(Object(Request))
#4 /home2/marshal/public_html/marsh/lib/pkp/classes/template/PKPTemplateManager.inc.php(1247): TemplateManager->initialize(Object(Request))
#5 /home2/marshal/public_html/marsh/lib/pkp/classes/plugins/Plugin.inc.php(359): PKPTemplateManager::getManager()
#6 /home2/marshal/public_html/marsh/lib/pkp/classes/plugins/Plugin.inc.php(115): Plugin->_registerTemplateResource()
#7 /home2/marshal/public_html/marsh/lib/pkp/classes/plugins/LazyLoadPlugin.inc.php(28): Plugin->register(‘generic’, ‘plugins/generic…’, NULL)
#8 /home2/marshal/public_html/marsh/plugins/generic/recommendByAuthor/RecommendByAuthorPlugin.inc.php(30): LazyLoadPlugin->register(‘generic’, ‘plugins/generic…’, NULL)
#9 /home2/marshal/public_html/marsh/lib/pkp/classes/plugins/PluginRegistry.inc.php(69): RecommendByAuthorPlugin->register(‘generic’, ‘plugins/generic…’, NULL)
#10 /home2/marshal/public_html/marsh/lib/pkp/classes/plugins/PluginRegistry.inc.php(142): PluginRegistry::register(‘generic’, Object(RecommendByAuthorPlugin), ‘plugins/generic…’, NULL)
#11 /home2/marshal/public_html/marsh/lib/pkp/classes/core/Dispatcher.inc.php(133): PluginRegistry::loadCategory(‘generic’, true)
#12 /home2/marshal/public_html/marsh/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request))
#13 /home2/marshal/public_html/marsh/index.php(69): PKPApplication->execute()
#14 {main}
thrown in /home2/marshal/public_html/marsh/lib/pkp/classes/core/DataObject.inc.php on line 65

@asmecher Even good to jump/upgrade from 3.3.0.7 to 3.3.0.10 directly?

Hi @doneforyou,

Yes.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher thanks, upgrade, all seems fine, things seems working fine unless I face any issue in future… but, why I am seeing these repeated errors in error.log?

[10-Apr-2022 03:05:20 America/Boise] PHP Warning: Cannot assign an empty string to a string offset in /home2/test/public_html/test/lib/pkp/classes/core/DataObject.inc.php on line 133
[10-Apr-2022 03:05:20 America/Boise] PHP Warning: Illegal string offset ‘en_US’ in /home2/test/public_html/test/lib/pkp/classes/core/DataObject.inc.php on line 133
[10-Apr-2022 03:05:20 America/Boise] PHP Warning: Cannot assign an empty string to a string offset in /home2/test/public_html/test/lib/pkp/classes/core/DataObject.inc.php on line 133
[10-Apr-2022 03:05:20 America/Boise] PHP Warning: Illegal string offset ‘en_US’ in /home2/test/public_html/test/lib/pkp/classes/core/DataObject.inc.php on line 133
[10-Apr-2022 03:05:20 America/Boise] PHP Warning: Cannot assign an empty string to a string offset in /home2/test/public_html/test/lib/pkp/classes/core/DataObject.inc.php on line 133
[10-Apr-2022 03:05:20 America/Boise] PHP Warning: Illegal string offset ‘en_US’ in /home2/test/public_html/test/lib/pkp/classes/core/DataObject.inc.php on line 133
[10-Apr-2022 03:05:20 America/Boise] PHP Warning: Cannot assign an empty string to a string offset in /home2/test/public_html/test/lib/pkp/classes/core/DataObject.inc.php on line 133
[10-Apr-2022 03:05:20 America/Boise] PHP Warning: Illegal string offset ‘en_US’ in /home2/test/public_html/test/lib/pkp/classes/core/DataObject.inc.php on line 133
[10-Apr-2022 03:05:20 America/Boise] PHP Warning: Cannot assign an empty string to a string offset in /home2/test/public_html/test/lib/pkp/classes/core/DataObject.inc.php on line 133
[10-Apr-2022 03:05:28 America/Boise] PHP Warning: array_keys() expects parameter 1 to be array, string given in /home2/test/public_html/test/lib/pkp/classes/core/DataObject.inc.php on line 65
[10-Apr-2022 03:05:28 America/Boise] PHP Warning: array_shift() expects parameter 1 to be array, null given in /home2/test/public_html/test/lib/pkp/classes/core/DataObject.inc.php on line 66
[10-Apr-2022 03:05:41 America/Boise] PHP Warning: array_keys() expects parameter 1 to be array, string given in /home2/test/public_html/test/lib/pkp/classes/core/DataObject.inc.php on line 65
[10-Apr-2022 03:05:41 America/Boise] PHP Warning: array_shift() expects parameter 1 to be array, null given in /home2/test/public_html/test/lib/pkp/classes/core/DataObject.inc.php on line 66
[10-Apr-2022 03:05:46 America/Boise] PHP Warning: array_keys() expects parameter 1 to be array, string given in /home2/test/public_html/test/lib/pkp/classes/core/DataObject.inc.php on line 65
[10-Apr-2022 03:05:46 America/Boise] PHP Warning: array_shift() expects parameter 1 to be array, null given in /home2/test/public_html/test/lib/pkp/classes/core/DataObject.inc.php on line 66
[10-Apr-2022 03:05:52 America/Boise] PHP Warning: array_keys() expects parameter 1 to be array, string given in /home2/test/public_html/test/lib/pkp/classes/core/DataObject.inc.php on line 65

Hi @doneforyou,

Those are data inconsistencies in your database. You should be able to ignore them for now but if you’re curious there are other threads in the forum about those messages.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher @jnugent
ok thanks but one thing I am wondering on
I have test environment on version 3.3.0.8 which does not show the side leftbar in admin area, while with new version I jsut installed can show the left sidebar, please take a look at the screenshots for better understanding.

The same thing is happening when I am upgrading from 3.3.0.7 to 3.3.0.10 - no left sidebar under dashboard/admin area
screen2
shot2 (2)

Is this normal behaviour?

A small toggle however being appears on the right top corder to navigated into the site but wanted to know what is wrong please

@asmecher @jnugent ah I have checked and when I am switching theme from material to default, all restored, however, there is no issue seen since the toggle button is appearing on the top right instead of left side column navigation area, but how to resolve this using material theme?

Hi @doneforyou,

I’d suggest contacting the author/maintainer of the Material theme plugin:

Regards,
Alec Smecher
Public Knowledge Project Team

This topic was automatically closed after 8 days. New replies are no longer allowed.