I am trying to migrate and upgrade an OJS 2.4.4.1 form a Windows (Apache 2.2, PHP 5.3.27, MySQL 5.6) host to an OJS 3.1.2 on a CentOS (Apache 2.4.6, PHP7.1.28, MariaDB 5.5.60).
I exported the old DB into a .sql dump file with the MySQL Workbench and then imported it via command line, copied the public and files folders from and edited config.inc.php accordingly. Then I ran the upgrade script from the tools folder and got the message that the upgrade was successful, and I can log in with the old admin account. But then I have all sorts of problems.
On the homepage I noticed that there are no special characters although everything is set to UTF-8 (config.inc.php, Apache and database). Some names are left out entirely if they contain special characters (ščž). The other thing is that I get "An unexpected error has occurred. Please reload the page and try again" when I click on "submissions" and if I click on "Users & Roles > Users" the list keeps loading into infinity.
During the upgrading process, I got some repeating warnings like:
> PHP Notice: unserialize(): Error at offset 4364 of 25291 bytes in /var/www/html/lib/pkp/classes/db/DAO.inc.php on line 352
And
> PHP Warning: Cannot use a scalar value as an array in /var/www/html/lib/pkp/classes/core/DataObject.inc.php on line 133
What could be the problem? What part of my procedure could have caused such behavior?
And the localisation settings fromt he config.inc.php file. The same settings work fine on the old server, so I am not sure where else to look for encoding misconfiguration.
[i18n]
; Default locale
locale = en_US
; Client output/input character set
client_charset = utf-8
; Database connection character set
; Must be set to "Off" if not supported by the database server
; If enabled, must be the same character set as "client_charset"
; (although the actual name may differ slightly depending on the server)
connection_charset = Off
; Database storage character set
; Must be set to "Off" if not supported by the database server
database_charset = Off
; Enable character normalization to utf-8 (recommended)
; If disabled, strings will be passed through in their native encoding
; Note that client_charset and database collation must be set
; to "utf-8" for this to work, as characters are stored in utf-8
charset_normalization = Off
Yes, the upgrade would not go through without that. But as I mentioned in my previous post, I solved my problem by editing the /etc/my.cnf file of the MariaDB server, which was not set to UTF-8.