lucasdiedrich / ojs

Open Journal Systems (OJS) is a journal management and publishing system.
GNU General Public License v3.0
19 stars 64 forks source link

Unknown charset error #10

Closed rockenbach closed 5 years ago

rockenbach commented 5 years ago

Lucas, congratulations for the work you have done!

I'm trying to run ojs for the first time and found this docker repository. I getting the following error and would be very grateful if you can help me because I'm trying to get this software running locally for all day long.

Errors occurred during installation A database error has occurred: Server sent charset unknown to the client. Please, report to the developers

First I kept only - /etc/localtime:/etc/localtime volume of pkp-ojs service, and it was my only modification. Second, I create the file config/ojs.config.inc.php based on the default template and changed only these configs bellow:

client_charset = utf-8
connection_charset = uft8
database_charset = uft8

but the same error still happening.

On the installation page I choose 'Unicode (UTF-8)' on all charset configs and on the database section I defined:

Drive: MySQL
Host: mysql-ojs (the mysql' container name)
Username: ojs
Password: ojs
Database name: ojs
Unchecked 'create new database' (before I checked the mysql container and the database exists as expected)

Do you have some clue on what is the problema and how can I fix that?

lucasdiedrich commented 5 years ago

Hi @rockenbach, can you please insert your docker-compose file or the exactly docker run CMD which you are using?

This is odd, the default charset is UTF-8, this shouldn't be happening.

rockenbach commented 5 years ago

Hi, @lucasdiedrich. Thanks for your time.

My current docker-compose is:

version: "3.3"

services:

    mysql-ojs:
        image: mysql:latest
        container_name: mysql-ojs
        restart: always
        environment:
            MYSQL_ROOT_PASSWORD: ojs
            MYSQL_DATABASE: ojs
            MYSQL_USER: ojs
            MYSQL_PASSWORD: ojs

    pkp-ojs:
        image: lucasdiedrich/ojs:latest
        #build:
        #    context: .
        container_name: pkp-ojs
        restart: always
        ports:
            - "8080:80"
            - "8443:443"
        # volumes:
            # - /etc/localtime:/etc/localtime             # to sync the container clock with localhost.
            # - ./files/private:/var/www/files            # ojs' private files
            # - ./files/public:/var/www/html/public       # ojs' public files
            # - ./files/logs:/var/log/apache2             # apache logs

            # default
            #- ./config/ojs.config.inc.php:/var/www/html/config.inc.php      # ojs' config
            # - ./config/apache.htaccess:/var/www/html/.htaccess              # ojs' htaccess
            #- ./config/php.custom.ini:/usr/local/etc/php/conf.d/custom.ini  # php config
        environment:
            OJS_CLI_INSTALL: 1
            OJS_DB_HOST: 'mysql-ojs'
        depends_on: 
            - mysql-ojs

I also checked the character_set_database and collation_database of ojs database and the first was utf8mb4 and the last was utf8mb4_0900_ai_ci.

At least for my knowledge the default configs should work fine, but I'm not an expert. Do you have some ideia on how to solve this problem?

Looks like this isn't a bug related to your project, so if you wanna to close this issue I'm okay with it and I'll come back to make a comment if I find the answer.

rockenbach commented 5 years ago

In the end the problem were with the latest mysql' version that changed the default value of the character_set_server that was causing this issue (more info here and here). As my goal was just setup an OJS version to see if it attends to my requirements, I just change de mysql' version to mysql:5.7 and everything is working fine.

Thanks, @lucasdiedrich

lucasdiedrich commented 5 years ago

That's interesting Charles, thanks for the feedback.

Em ter, 27 de nov de 2018 16:33, Charles Rockenbach < notifications@github.com> escreveu:

In the end the problem were with the latest mysql' version that changed the default value of the character_set_server that was causing this issue (more info here https://github.com/docker-library/mysql/issues/284 and here https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html#mysqld-8-0-1-charset). As my goal was just setup an OJS version to see if it attends to my requirements, I just change de mysql' version to mysql:5.7 and everything is working fine.

Thanks, @lucasdiedrich https://github.com/lucasdiedrich

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/lucasdiedrich/ojs/issues/10#issuecomment-442167567, or mute the thread https://github.com/notifications/unsubscribe-auth/AAx5SgnffiDmRSeLLRjmUy_xNifkdYahks5uzYV3gaJpZM4YxESa .