Re: Connecting PostgreSQL db using Pear - Mailing list pgsql-php

From Andrew McMillan
Subject Re: Connecting PostgreSQL db using Pear
Date
Msg-id 1033523415.20483.62.camel@kant.mcmillan.net.nz
Whole thread Raw
In response to Connecting PostgreSQL db using Pear  (Devrim GUNDUZ <devrim@oper.metu.edu.tr>)
Responses Re: Connecting PostgreSQL db using Pear
List pgsql-php
On Tue, 2002-10-01 at 04:59, Devrim GUNDUZ wrote:
> Hi all,
>
> I've been trying to connect to a local PostgreSQL server using Pear, but I
> could not succeed:
>
> Here is the connect string:
>
> $dsn = "pgsql://$username:$password@tcp($hostname:$port)/$dbname";
>
> And all the variables seems to be ok when I print $dsn.
>
> However, I get the following error:
>
> "DB Error: connect failed"
>
> What should I do to correct this?

Can you confirm that the postmaster is started with support for TCP
connections?  It is possible that in other instances you are connecting
via unix sockets.

I haven't used PEAR myself, but that seems like one possible problem
with the sort of connect string above.

More information might mean others could provide more help.

Cheers,
                    Andrew.
--
---------------------------------------------------------------------
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/         PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201     MOB: +64(21)635-694    OFFICE: +64(4)499-2267
           Survey for free with http://survey.net.nz/
---------------------------------------------------------------------


pgsql-php by date:

Previous
From: "Zhidian Du"
Date:
Subject: Where find a demo/example of one-many input web address?
Next
From: adriantineo@softhome.net
Date:
Subject: Authenticating user