pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
unable to connect to PostgreSQL server
2+ messages / 2 participants
[nested] [flat]

* unable to connect to PostgreSQL server
@ 2002-01-23 06:41  Faudzy Sulaiman <faudzy@ummail.um.edu.my>
  0 siblings, 1 reply; 2+ messages in thread

From: Faudzy Sulaiman @ 2002-01-23 06:41 UTC (permalink / raw)
  To: pgsql-php

I'm getting an error message :

Warning: Unable to connect to PostgreSQL server: PQconnectDB() -- couldn't read 
postmaster response: errno=104 Connection reset by peer in /var/www/html/test1.php 
on line 24
 
my PHP script is :

if($myconn = pg_connect("dbname=mydb
   host=localhost
   port=443
   user=faudzy
   "))
{ echo "Connection to PostgreSQL server 'localhost' successful<br>\n"; }


how do I fix it ?


thanks.

------------------------------
http://www.um.edu.my



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: unable to connect to PostgreSQL server
@ 2002-01-25 22:44  Martín Marqués <martin@bugs.unl.edu.ar>
  parent: Faudzy Sulaiman <faudzy@ummail.um.edu.my>
  0 siblings, 0 replies; 2+ messages in thread

From: Martín Marqués @ 2002-01-25 22:44 UTC (permalink / raw)
  To: Faudzy Sulaiman <faudzy@ummail.um.edu.my>; +Cc: pgsql-php

On Mié 23 Ene 2002 03:41, you wrote:
> I'm getting an error message :
>
> Warning: Unable to connect to PostgreSQL server: PQconnectDB() -- couldn't
> read postmaster response: errno=104 Connection reset by peer in
> /var/www/html/test1.php on line 24
>
> my PHP script is :
>
> if($myconn = pg_connect("dbname=mydb
>    host=localhost
>    port=443

Try eliminating this line (don't put the port).
Also, check if the postmaster is running in the server.

Saludos... :-)

-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-----------------------------------------------------------------
Martín Marqués                  |        mmarques@unl.edu.ar
Programador, Administrador, DBA |       Centro de Telematica
                       Universidad Nacional
                            del Litoral
-----------------------------------------------------------------



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-01-25 22:44 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-01-23 06:41 unable to connect to PostgreSQL server Faudzy Sulaiman <faudzy@ummail.um.edu.my>
2002-01-25 22:44 ` Martín Marqués <martin@bugs.unl.edu.ar>

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