From: Dan Wilson <killroyboy@users.sourceforge.net>
To: Riyaz@umapinc.com
Cc: pgsql-php@postgresql.org
Subject: Re: connecting To PostgreSQL - Getting Error
Date: Tue, 6 Aug 2002 08:17:30 -0600
Message-ID: <1028643450.3d4fda7a45740@webmail.acucore.com> (raw)
In-Reply-To: <OFEB495C03.7E99C5C8-ON05256C0D.005394AD-85256C0D.004E7012@UMAPINC.COM>
References: <OFEB495C03.7E99C5C8-ON05256C0D.005394AD-85256C0D.004E7012@UMAPINC.COM>
That port is not standard. Are you sure that is the correct port to connect
with? Also, make sure you are using the tcpip_socket. Check your
postgresql.conf file and uncomment and turn on the tcpip_socket option.
Your other option is to just connect using the local socket (which is more
secure anyway). You can do this by just leaving of the host option in your
connection string.
-Dan
Quoting Riyaz@umapinc.com:
> Hello All,
> I am running Postgresql on a linux Qube and trying to connect to it
> using PHP. But it is giving me the following error:
>
> Warning: Unable to connect to PostgreSQL server: connectDB() -- connect()
> failed:
> Connection refused Is the postmaster running (with -i) at 'localhost' and
> accepting connections on TCP/IP port '5583'? in
> /home/groups/smarttools/web/testpg2.php on line 21
>
> I don't think I am using Unix sockets as I can connect to the database on
> psql monitor without -i option and without specifying the port number.
>
> Any tips on solving this?
>
> Also in what files are connectDB - - connect() functions stored?
>
> Thanks,
> Riyaz.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: killroyboy@users.sourceforge.net, Riyaz@umapinc.com
Subject: Re: connecting To PostgreSQL - Getting Error
In-Reply-To: <1028643450.3d4fda7a45740@webmail.acucore.com>
References: <OFEB495C03.7E99C5C8-ON05256C0D.005394AD-85256C0D.004E7012@UMAPINC.COM> <1028643450.3d4fda7a45740@webmail.acucore.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox