HTTP ERROR 500 when php environnent changed from 7.4 to 8.0

I am upgrading my ojs website and reached 3.3.0.19 which is perfecty working with php 7.4. When I change the environment to php 8.0 the website gives error 500.
(website agrimaroc.org at ovh.com)
Please help me with clues to what the problem would be and eventually how I should solve it.

Best regards,

This issue could have several causes. Most likely, one of the plugins is causing this or a required PHP component is not defined. To better understand the root cause, please check the PHP error log file and share the error messages. This will help us provide better assistance.

Thank you kerimsarigul for your prompt reply. I do not have access to php error logs. I will try to disable some plugins and retry to go to php 8.

By enabling debug on configuration file, I got this message:


Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /home/vulgaris/ojs3/revue/lib/pkp/classes/core/DataObject.inc.php:133
Stack trace:
#0 /home/vulgaris/ojs3/revue/lib/pkp/classes/db/SchemaDAO.inc.php(249): DataObject->setData(‘onlineIssn’, ‘2550-4401’, ‘fr_CA’)
#1 /home/vulgaris/ojs3/revue/lib/pkp/classes/context/ContextDAO.inc.php(66): SchemaDAO->_fromRow(Array)
#2 /home/vulgaris/ojs3/revue/lib/pkp/classes/core/PKPRouter.inc.php(254): ContextDAO->getByPath(‘Actes_IAVH2’)
#3 /home/vulgaris/ojs3/revue/lib/pkp/classes/core/PKPRequest.inc.php(760): PKPRouter->getContext(Object(Request), 1)
#4 /home/vulgaris/ojs3/revue/classes/core/Request.inc.php(64): PKPRequest->_delegateToRouter(‘getContext’, 1)
#5 /home/vulgaris/ojs3/revue/lib/pkp/classes/i18n/PKPLocale.inc.php(135): Request->getContext()
#6 /home/vulgaris/ojs3/revue/lib/pkp/classes/i18n/PKPLocale.inc.php(290): PKPLocale::getLocale()
#7 /home/vulgaris/ojs3/revue/lib/pkp/classes/core/Dispatcher.inc.php(116): PKPLocale::initialize(Object(Request))
#8 /home/vulgaris/ojs3/revue/lib/pkp/classes/core/PKPApplication.inc.php(360): Dispatcher->dispatch(Object(Request))
#9 /home/vulgaris/ojs3/revue/index.php(68): PKPApplication->execute()
#10 {main} thrown in /home/vulgaris/ojs3/revue/lib/pkp/classes/core/DataObject.inc.php on line 133

Hi @houara,

It looks like you have some bad data in the database. What do you get for the following SQL query?

SELECT * FROM journal_settings
WHERE setting_name = 'onlineIssn' AND locale IS NOT NULL AND locale <> '';

All journal_settings entries with a setting_name = 'onlineIssn' should have a locale column set to an empty string. Anything else is invalid.

Make sure to take a backup before working in the database directly, and you may have to flush your data cache after making changes to journal_settings before you’ll see them take effect.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

I get this image:

Here is “onlineIssn” entries in the journal-settings table:
vulga2

Should I delete the one with locale fr_CA?

Best regards Dear Alec,

Hi @houara,

Yes, delete the one with setting_value = 'onlineIssn' AND locale = 'fr_CA'.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Now php 8.0 is accepted with the folowing messages and corrupt theme.

Notice : Deprecated call without request object. in /home/vulgaris/ojs3/revue/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 1295

Notice : Deprecated call without request object. in /home/vulgaris/ojs3/revue/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 1295

Notice : Deprecated call without request object. in /home/vulgaris/ojs3/revue/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 1295

Notice : Deprecated call without request object. in /home/vulgaris/ojs3/revue/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 1295

Notice : Deprecated call without request object. in /home/vulgaris/ojs3/revue/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 1295

Notice : Deprecated call without request object. in /home/vulgaris/ojs3/revue/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 1295

Notice : Deprecated call without request object. in /home/vulgaris/ojs3/revue/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 1295

Notice : Deprecated call without request object. in /home/vulgaris/ojs3/revue/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 1295

Notice : Deprecated call without request object. in /home/vulgaris/ojs3/revue/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 1295

Notice : Deprecated call without request object. in /home/vulgaris/ojs3/revue/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 1295

Notice : Deprecated call without request object. in /home/vulgaris/ojs3/revue/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 1295

Notice : Deprecated call without request object. in /home/vulgaris/ojs3/revue/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 1295

Hi @houara,

Those are just notices, and won’t break the site – but if you’re directing the errors or warnings to the browser, they’ll probably interfere. (I suspect those warnings are probably coming from the theme or another plugin.)

If you’re still encountering problems once debugging is disabled, I’d suggest starting a new topic, since the topic you started with has been resolved.

Regards,
Alec Smecher
Public Knowledge Project Team

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