Re: MDB2 connect failure - php5,

From: Date: Mon, 12 Mar 2007 18:54:40 +0000
Subject: Re: MDB2 connect failure - php5,
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26829@lists.php.net to get a copy of this message
Hi, rwhartung wrote:
Note that the username and password are identical to those used with psql on the command line. I can connect with pg_connect() without any problem. I have tried various combinations of require-once (e.g. require_once "MDB2.php", require_once("MDB2.php") and it doesn't make any difference. ideas?
By default psql connects through a local unix socket. You didn't give your pg_connect() connection string, but I suspect that it doesn't have a "host" part and therefore you connect through local socket as well. PostgreSQL can be configured to listen only on this local socket and thus you'll be able to connect without specifying the host, but won't be able to connect to "localhost" (which means, connect through TCP socket). Change your postgresql.conf to accept TCP connections or change your DSN string to use local socket.

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