Thread: Re: connecting via php

Re: connecting via php

From
"K Parker"
Date:
>   $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