Connecting to PostgreSQL over UNIX domain sockets

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • afalanga@syracusenetworks.com

    Connecting to PostgreSQL over UNIX domain sockets

    Hi,

    I seem to be unable to connect to my PostgreSQL database over UNIX
    domain sockets, i.e. pg_connect("dbn ame=mydb");

    No matter what I do to the pg_hba.conf file, or anything else, PHP
    always returns things like, "Are you sure the server is running
    locally?", etc. What's the magic chant to connect to PostgreSQL over
    UNIX domain sockets? I know it's working because I can connect via
    psql. In case it matters, I'm using all this on Fedora C3.

    Andy

    NOTE* E-mail address in header is no longer valid.

  • CJ Llewellyn

    #2
    Re: Connecting to PostgreSQL over UNIX domain sockets

    On Thu, 17 Mar 2005 07:47:26 -0800, afalanga wrote:
    [color=blue]
    > Hi,
    >
    > I seem to be unable to connect to my PostgreSQL database over UNIX
    > domain sockets, i.e. pg_connect("dbn ame=mydb");
    >
    > No matter what I do to the pg_hba.conf file, or anything else, PHP
    > always returns things like, "Are you sure the server is running
    > locally?", etc. What's the magic chant to connect to PostgreSQL over
    > UNIX domain sockets? I know it's working because I can connect via
    > psql. In case it matters, I'm using all this on Fedora C3.[/color]

    Did you connect to the Postgres server as the web server user?

    Comment

    Working...