Re: connecting via php - Mailing list pgsql-general

From K Parker
Subject Re: connecting via php
Date
Msg-id KNDCMHEEGMLNAAAA@shared1-mail.whowhere.com
Whole thread Raw
List pgsql-general
>   $connection = pg_connect("localhost",
                "113", "testjordi");

Why would you assume 113 is the port?  But you shouldn't need to use TCP/IP anyway if you're connecting to the local
machine(and TCP/IP connections aren't even available unless you start postmaster with the '-i' flag.)   

I've never had any problem using the simplest style of unix-domain connection by saying (as shown in the first row of
thehow-to-connect table on the pg manual page of php): 

    if (! ($conn = pg_pconnect("","","","","webdata")))
        {
        $failure_msg = "Can't connect\n";
        }
    else
        // you're in like flynn.



Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at http://www.eudoramail.com

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: count(*) from view??
Next
From: Stephan Szabo
Date:
Subject: Re: Column name case conversion