Problems with user

good morning to all
I have updated the version to ojs 3.1 since version 2.4, previously I did update tests to 3.0 from version 2.4 and everything worked correctly, we had not finished the migration when the new version 3.1 came out so we decided to try it and migrate from 2.4 . when migrating in this new version the first problem we encountered was the php version which we updated, we actually update apache completely, we use ubuntu. after doing this update we did the migration process to ojs without any problem.
but my ojs 3.1 is not working well, it is sending me strange characters instead of the accents, and in the User & Roles section it does not show me the users it stays loading the information.
eh investigated that can be the format with which the information is saved because mysql has the format utf8mb4 the configuration of my eyes is in utf-8.
Because you can be hanging the User & Roles section.
Note: Although I can not see the users in this section, I can log in with them.

Hi @JoannaB,

When a page is endlessly trying to load, like your user roles section, usually a PHP error has occurred. Please check your error log for details. You can also probably find more information there about the problems you’re having with characters.

Amanda Stevens
Public Knowledge Project Team

Thanks for answering
Checking the error log I found the following messages.

[Wed Nov 29 08:46:02.893948 2017] [:error] [pid 7894] [client] PHP Warning: Cannot use a scalar value as an array in /var/www/ojs3111/lib/pkp/classes/core/ on line 133
[Wed Nov 29 08:46:02.894154 2017] [:error] [pid 7894] [client] PHP Warning: Cannot use a scalar value as an array in /var/www/ojs3111/lib/pkp/classes/core/ on line 133
[Wed Nov 29 08:46:02.894256 2017] [:error] [pid 7894] [client] PHP Notice: unserialize(): Error at offset 186 of 416 bytes in /var/www/ojs3111/lib/pkp/classes/db/ on line 352
[Wed Nov 29 08:46:02.991694 2017] [:error] [pid 7895] [client] PHP Warning: Cannot use a scalar value as an array in /var/www/ojs3111/lib/pkp/classes/core/ on line 133
[Wed Nov 29 08:46:02.991909 2017] [:error] [pid 7895] [client] PHP Warning: Cannot use a scalar value as an array in /var/www/ojs3111/lib/pkp/classes/core/ on line 133
[Wed Nov 29 08:46:02.992021 2017] [:error] [pid 7895] [client] PHP Notice: unserialize(): Error at offset 186 of 416 bytes in /var/www/ojs3111/lib/pkp/classes/db/ on line 352

I still do not understand what my mistake is.

Hi @JoannaB,

The cause of the “PHP Warning: Cannot use a scalar value as an array in /var/www/ojs3111/lib/pkp/classes/core/ on line 133” message is a mix of localized (locale column is set) and non-localized (locale column is empty or null) for a single setting_name, which is a data error.

To figure out which settings it’s referring to, you can edit lib/pkp/classes/core/, and find line 133 or so, which should look like:
$this->_data[$key][$locale] = $value;
Just before this, add:
if (isset($this->_data[$key]) && !is_array($this->_data[$key])) error_log('Mixed localization for ’ . get_class($this) . ‘, setting "’ . $key . ‘"’);
Then trigger the warning again (e.g. by reloading the page you saw it on before), and look in your log for more details.

Regarding the strange characters instead of accents, you can check your character set configuration in and make sure it’s UTF8 throughout. Sometimes upgrading can inadvertently change your configuration.

Let me know how this goes.

Amanda Stevens
Public Knowledge Project Team

I checked my configuration…
My problem is that mysql changed a new format utf8mb4 and all datas are with this format… and not in utf8
When I change to utf8mb4 my file I can see my text with strange characteres perfectly… My problem is that all content table now is in white.

Hi @JoannaB,

Do you mean that you see blank pages on your site? I’m sorry but I don’t understand exactly what the problem is.

Did you try my suggestion above to debug your database and figure out where the localized settings need to be changed?

Amanda Stevens
Public Knowledge Project Team

Hello I did what they recommended me and this is the error that appears in my register …

[Tue Dec 12 09:44:56.766471 2017] [:error] [pid 3239] [client] PHP Parse error: syntax error, unexpected ‘error_log’ (T_STRING) in /var/www/ojs31/lib/pkp/classes/core/ on line 133, referer:
[Tue Dec 12 09:44:56.766498 2017] [:error] [pid 3239] [client] PHP Stack trace:, referer:
[Tue Dec 12 09:44:56.766503 2017] [:error] [pid 3239] [client] PHP 1. {main}() /var/www/ojs31/index.php:0, referer:
[Tue Dec 12 09:44:56.768989 2017] [:error] [pid 3239] [client] PHP 2. require() /var/www/ojs31/index.php:65, referer:
[Tue Dec 12 09:44:56.773024 2017] [:error] [pid 3239] [client] PHP 3. Application->__construct() /var/www/ojs31/lib/pkp/includes/, referer:
[Tue Dec 12 09:44:56.773052 2017] [:error] [pid 3239] [client] PHP 4. PKPApplication->__construct() /var/www/ojs31/classes/core/, referer:
[Tue Dec 12 09:44:56.773061 2017] [:error] [pid 3239] [client] PHP 5. import() /var/www/ojs31/lib/pkp/classes/core/, referer:
[Tue Dec 12 09:44:56.773066 2017] [:error] [pid 3239] [client] PHP 6. require_once() /var/www/ojs31/lib/pkp/includes/, referer:
[Tue Dec 12 09:44:56.773070 2017] [:error] [pid 3239] [client] PHP 7. import() /var/www/ojs31/lib/pkp/classes/db/, referer:
[Tue Dec 12 09:44:56.773075 2017] [:error] [pid 3239] [client] PHP 8. require_once() /var/www/ojs31/lib/pkp/includes/, referer:
[Tue Dec 12 09:44:56.773079 2017] [:error] [pid 3239] [client] PHP 9. import() /var/www/ojs31/lib/pkp/classes/db/, referer:

Hi @JoannaB,

That’s telling us there is a setting error in your journal settings table but it’s still not identifying where the error is. Can you try running this query in your database?

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 <> ‘’;

Amanda Stevens
Public Knowledge Project Team

The query does not yield any results.

because previously I had already executed
When I run the query the first time the answer was the following

I did what is recommended:

  • Delete both metaCitations entries from your DB
  • Flush the OJS data cache

Hi @JoannaB,

If you deleted the metaCitations entries and you’re still getting a blank screen and the parse error posted above, you can try some of the suggestions in this FAQ entry to identify the problem.

Amanda Stevens
Public Knowledge Project Team

Hi… I check var/log/apache2/errror.log and the message is this.

[Thu Dec 14 09:33:35.599988 2017] [:error] [pid 32657] [client] Malformed UTF-8 characters, possibly incorrectly encoded, referer:

check my database and find that


and I find that one tables are like utf8-general but someones are like latin…
when I migrate my database to test. I used the command

mysqldump -u root -p --default-character-set=utf8 ojs-databse > backup.sql

for don`t have problems

Hi @JoannaB,

OJS only works with a single character set configuration (in, so I’m not sure how you’d get a mix of different encodings, unless e.g. your database configuration changed over time e.g. as you upgraded your OJS.

Disentangling mixed encodings is more of a database question than an OJS question – I’d suggest e.g. dumping your database, working with the dump file to ensure everything is consistent, then reloading it again. Something like might be useful.

Alec Smecher
Public Knowledge Project Team