0

I'm getting unreadable exception messages where almost all characters are replaced with question marks (?) in application based on Symfony 2.0.18 and Doctrine 2.1.7

Here is an example:

SQLSTATE[08006] [7] ?????: ? pg_hba.conf ??? ??????, ??????????? ??????????? ??? ?????????? ? ?????????? "123.12.12.123" ??? ???????????? "username", ???? ?????? "dbname", SSL ????.

I'm not worried about why I'm getting this exception. I just want to know how to make it readable.

Here is my doctrine config:

# Doctrine Configuration
doctrine:
  dbal:
    default_connection:   default
    connections:
      default:
        charset:  UTF8
        driver:   %emp_database_driver%
        host:     %emp_database_host%
        dbname:   %emp_database_name%
        port:     %emp_database_port%
        user:     %emp_database_user%
        password: %emp_database_password%
  orm:
    auto_generate_proxy_classes: %kernel.debug%
    entity_managers:
      default:
        connection: default
        auto_mapping: true
        mappings:
          StofDoctrineExtensionsBundle: false

Any ideas?

Erwin Brandstetter
  • 605,456
  • 145
  • 1,078
  • 1,228
Mike Milkman
  • 583
  • 1
  • 7
  • 14

2 Answers2

0

You should change console encoding. But let me translate your message

SQLSTATE[08006] [7] FATAL: no pg_hba.conf entry for host "123.12.12.123", 
user "username", database "dbname", SSL OFF

So fix your pg_hba.conf configuration file.

Ziumin
  • 4,800
  • 1
  • 27
  • 34
  • Can you tell what exact changes I should apply to `pg_hba.conf`? – Mike Milkman Aug 04 '14 at 12:44
  • Add line like `host dbname username 123.12.12.123 trust` and read postgresql manual about this file to be sure your security is well configured – Ziumin Aug 06 '14 at 05:47
0

What you see is a combination of client_encoding (defines what the server sends back) plus actual encoding settings of your client. Both should match your actual encoding on the client machine.

More Details:

Community
  • 1
  • 1
Erwin Brandstetter
  • 605,456
  • 145
  • 1,078
  • 1,228