Re: PostgreSQL + PHP can't connect

From: "Rommel B(dot) Abaya" <rommel(dot)abaya(at)ramcargroup(dot)com>
To: spaceface(at)cable(dot)a2000(dot)nl
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL + PHP can't connect
Date: 2000-09-11 14:34:05
Message-ID: 39BCED5C.3CF60739@ramcargroup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

i think you should use port 5432. this is the default port of
PostgreSQL unless of course your SysAdmin changed it to something else.

Jordi Scharp wrote:

> Hello there all,
>
> I have a huuuuuuuuuuuuge problem!
>
> I have a PosgreSQL database running called testjordi (Jordi's my name
> ;)) and I'm connecting it to port 113 (I really don't know which port
> to use but all other give an instant error msg and 113 doesn't so I
> think that's the right one).
> Second of all I've made a php file with the following contents
>
> <HTML>
> <HEAD>
> <TITLE>pg_exec</TITLE>
> </HEAD>
> <BODY>
> <?
> $connection = pg_connect("localhost",
> "113", "testjordi");
>
> pg_close($connection);
> ?>
> </BODY>
> </HTML>
>
> just to test whether it can connect or not..
> when I load it it keeps loading for a helluvalong time.. about maybe 4
> mins... and then replies:
> -=-
> Warning: Unable to connect to PostgresSQL server: pqReadData() --
> backend closed the channel unexpectedly. This probably means the
> backend terminated abnormally before or while processing the request.
> in /usr/local/apache/htdocs/pg_exec.php3 on line 8
>
> Warning: 0 is not a PostgresSQL link index in
> /usr/local/apache/htdocs/pg_exec.php3 on line 10
>
> -=-
>
> The Line 10 error is ofcourse caused cuz it can't connect in line 8..
> does anyone know what the problem is?
>
>
> php_info() replies with
>
> PostgreSQL
> Allow persistent links: Yes
> Persistent links: 0/Unlimited
> Total links: 0/Unlimited
> Compilation definitions: PGSQL_INCLUDE=
> PGSQL_LFLAGS=
> PGSQL_LIBS=
>
> -=-
>
> does anyone has a clue.. if so PLEASE I'M BEGGING reply.. it's very
> important...
>
> Thanks very much,
> -Jordi

In response to

Browse pgsql-general by date

  From Date Subject
Next Message The Hermit Hacker 2000-09-11 14:46:37 Re: problems with GRANT on Solaris 8
Previous Message Rommel B. Abaya 2000-09-11 14:15:55 Re: problems with GRANT on Solaris 8