Date: 07/22/02
- Next message: Devrim GUNDUZ: "Re: [PHP-DB] [PHP] pg_connect() unable to connect to PostgreSQL server :could not connect to server"
- Previous message: Eric: "Re: [PHP-DB] PHP4 Not Seeing PostgreSQL 7.2"
- In reply to: Devrim GUNDUZ: "Re: [PHP-DB] [PHP] pg_connect() unable to connect to PostgreSQL server :could not connect to server"
- Next in thread: Devrim GUNDUZ: "Re: [PHP-DB] [PHP] pg_connect() unable to connect to PostgreSQL server :could not connect to server"
- Reply: Devrim GUNDUZ: "Re: [PHP-DB] [PHP] pg_connect() unable to connect to PostgreSQL server :could not connect to server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I agree, Unix domain sockets very much faster.
You have to start POSTMASTER with the -i switch to get it to listen on the
designated port (5432 by default I think).
Eric
"Devrim Gunduz" <devrim <email protected>> wrote in message
news:Pine.LNX.4.44.0207221044330.26184-100000 <email protected>
>
> Hi,
>
> On Mon, 22 Jul 2002, Vincent wrote:
>
> > "Warning: pg_connect() unable to connect to PostgreSQL
> > server: could not connect to server: Connection
> > refused Is the server running on host localhost and
> > accepting TCP/IP connections on port 5432? in
> > /usr/local/apache/htdocs/postgresql.php on line 8"
> > Unable to connect to database
>
> Please avoid using host=localhost in pg_connect parameters.
>
> As far as I guess, you have not activated the TCP-IP port in
> postgresql.conf, and if you use host=localhost parameter, pg_connect will
> try to connect to PostgreSQL via TCP-IP. If you do not use that parameter,
> then it will connect to the database via Unix domain sockets, which is
> really faster than TCP-IP sockets (and more secure).
>
> HTH.
>
> Best regards.
>
> --
>
> Devrim GUNDUZ
>
> devrim <email protected>
> devrim.gunduz <email protected>
>
> Web : http://devrim.oper.metu.edu.tr
> -------------------------------------
>
>
>
>
>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Devrim GUNDUZ: "Re: [PHP-DB] [PHP] pg_connect() unable to connect to PostgreSQL server :could not connect to server"
- Previous message: Eric: "Re: [PHP-DB] PHP4 Not Seeing PostgreSQL 7.2"
- In reply to: Devrim GUNDUZ: "Re: [PHP-DB] [PHP] pg_connect() unable to connect to PostgreSQL server :could not connect to server"
- Next in thread: Devrim GUNDUZ: "Re: [PHP-DB] [PHP] pg_connect() unable to connect to PostgreSQL server :could not connect to server"
- Reply: Devrim GUNDUZ: "Re: [PHP-DB] [PHP] pg_connect() unable to connect to PostgreSQL server :could not connect to server"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

