The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Postgres

Discussion in 'General Discussion' started by Slav, Feb 24, 2004.

  1. Slav

    Slav Well-Known Member

    Joined:
    Oct 28, 2002
    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    16
    Hi iw as wondering if anyone can tell me a thing about postgres.
    We have enabled it and it shows it in the cpanel on the left menu and as a image. If we go and create a user and then a database name and then add then toghether, all we see is the databse name and the user.
    So what i wanted to know should at that point it show us all the conenction strings listed like t does when you do a mysql one?
    Or thats it? If ther eis more to is what could the issue be?

    or is there a trick to this?
    "THey are trying to use Postgres, but localhost port 5432, does not seem to be listening.They can use Pgadmin and create
    tables, but they say that they need the connection string to connect through to the database. Do you know what is needed to connect to a postgres database?"

    Thanks
    Slav
     
    #1 Slav, Feb 24, 2004
    Last edited: Feb 24, 2004
  2. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    The default cpanel install is not setup to listen on 5432. You can change that by modifying postgresql.conf and restarting postgres. (And make sure your firewall allows it).

    However, if you do not want to do that, postgres can connect by the unix domain socket. In that case, the connection string will be:

    $dbconn = pg_connect("dbname=DATABASE user=USERNAME password=PASSWORD");
     
  3. Slav

    Slav Well-Known Member

    Joined:
    Oct 28, 2002
    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    16
    thnaks i will let them know this. See how they go with it.
     

Share This Page