Re: A DB::connect problem

From: Date: Thu, 23 Jun 2005 15:47:36 +0000
Subject: Re: A DB::connect problem
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-19743@lists.php.net to get a copy of this message
On 6/23/05, Michael Moerz <natoka@inode.at> wrote: > Hi! > > os: gentoo > apache: 2.0.54 > php: 4.3.11 > db: postgresql 8.0.1 > Pear: 1.3.5 > Pear::DB : 1.6.8 > > pg_hba.conf contains access granting statements for dbuser user to > unix sockets via /tmp and to tcp-ip port 5432 at localhost. > > using following dsns: > > $dsn = "pgsql://user:pwd@tcp(localhost:5432)/dbname"; I haven't used pgsql myself with PEAR::DB, but perhaps this should be: $dsn = "pgsql://user:pwd@localhost/dbname"; or $dsn = "pgsql://user:pwd@localhost:5432/dbname"; > > $dsn = "pgsql://user:pwd@unix(/tmp)/dbname"; > > fail with the following code: > > $db = DB::connect($dsn); > if (PEAR::isError($db)) { > die($db->getMessage()); You may also want to add getUserInfo() to the output here. > } > -- Justin Patrin

« previous php.pear.general (#19743) next »