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/ ---------------------------------------------------------------------