Re: DB pgsql dsn

From: Date: Tue, 23 Nov 2004 20:29:54 +0000
Subject: Re: DB pgsql dsn
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15784@lists.php.net to get a copy of this message
Justin Patrin <papercrane@gmail.com> wrote: > On Tue, 23 Nov 2004 14:57:08 -0000, Eduardo Gargiulo > <ejg-php.pear@ar.homelinux.org> wrote: > > I've changed pgsql application access from tcp to unix socket. I'm trying a > > dsn like this > > > > pgsql://user:password@(/var/run/postgresql/.s.PGSQL.5432)/dbname > > > > and > > > > pgsql://user:password@unix(/var/run/postgresql/.s.PGSQL.5432)/dbname > > > > but the system never reaches the database. Is there any problem with the dsn > > syntax? I've copied the socket definition from netstat command output and I > > can connect to the databse from command line without problems. > > > > Any help would be appreciated. > > > > What error does it give? Make sure to include the userInfo. Finally it works, the trick was don't specify the socket path, pgsql://user:password@unix()/dbname works! The examples found on /usr/share/php/tests/DB/tests/db_parsedsn.phpt helped me. --ejg

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