to upgrade failing with an error

Describe the issue or problem

  1. I made a clone of both the package and the attached mysql database, and confirmed that the clone worked identically to the production server.
  2. I then substituted the code for in the directory, keeping the original config.inc.php file, setting “installed = Off”
  3. When I then attempted to access the application and selected “[Click here]” where it says " If you are upgrading an existing installation of OJS, click here to proceed
  4. On the next page, I then clicked “Open Open Journal Systems” but simply received a white page.
  5. Reloading the page, two new lines appeared in the previous dialog:
    Errors occurred processing this form:
  1. Looking at the error-log, I find this:
    [07-Feb-2023 03:09:10 America/Chicago] PHP Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1115 Unknown character set: ‘’ in /home/teslejsu/public_html/ejojs4/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:79
    Stack trace:
    #0 /home/teslejsu/public_html/ejojs4/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(79): PDO->prepare(‘set names ‘’ co…’, Array)
    #1 /home/teslejsu/public_html/ejojs4/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(76): Doctrine\DBAL\Driver\PDOConnection->prepare(‘set names ‘’ co…’)
    #2 /home/teslejsu/public_html/ejojs4/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(32): Illuminate\Database\Connectors\MySqlConnector->configureEncoding(Object(Doctrine\DBAL\Driver\PDOConnection), Array)
    #3 /home/teslejsu/public_html/ejojs4/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(184): Illuminate\Database\Connectors\MySqlConnector in /home/teslejsu/public_html/ejojs4/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 672

My character set in the config file looks like this:

; Default locale
locale = en_US

; Client output/input character set
client_charset = utf-8

; Database connection character set
connection_charset = Off

What is the problem? How can I fix it? Any or all help would be appreciated!!

Hi @trobb49,

since your log says “unknown character set” you could try setting connection_charset = utf8.

Thank you, Lenare! The two places where the character set needs to be specified are slightly different. One requires the hyphen, but the other does not. Anyway, it completed the upgrade process. Thank you very much!!

This is what the config.inc.php looks like now:
; Default locale
locale = en_US

; Client output/input character set
client_charset = utf8 <–Note, a hyphen is NOT accepted here, but is required below!

; Database connection character set
connection_charset = utf-8