Connecting cakephp 2.0 with PostgreSQL

前端 未结 2 1615
耶瑟儿~
耶瑟儿~ 2021-01-29 04:07

I am using cakephp 2.0 and a wamp server. I have enabled the pdo of postgres in the php and i tried connecting to Postgres. However it still says that there is an error. My logi

2条回答
  •  清酒与你
    2021-01-29 04:48

    A shot in the dark: Is the name of the database Test or test? Unquoted identifiers are cast to lower case in PostgreSQL. The manual about that.

    Next shot in the dark: You are connecting to localhost. This is not a local connection via Unix domain socket. For this to work the database must be set up to listen to TCP/IP connections. So you need in your postgresql.conf:

    listen_addresses = '*'
    

    .. and restart.

    Also, your pg_hba.conf settings need to allow the connection. Could be a problem similar to this one.
    Start by reading the chapter Connection Settings in the fine manual.

    But I am done guessing now. You need to provide the error message.

提交回复
热议问题