Postgres with PHP

From: Catharina Paulsen <paulsen(at)hempels-ev(dot)de>
To: pgsql-general(at)hub(dot)org
Subject: Postgres with PHP
Date: 1999-12-15 10:58:01
Message-ID: 38577439.BC5A3DC6@hempels-ev.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I can´t get my local Postgres database work with PHP over TCP/IP
(Browser) connection.

PHP 3.12 is installed as Apache-module (Apache 1.3.9)
Postgres version 6.5., both came with my SuSE 6.3

The query script is running without problems at my provider´s machine
(apache 1.3.9, PHP 3.0.7 as CGI, Postgres 6.5).

On my local SuSE-box, psql monitor works fine. Access per telnet from
remote host (win98) is ok, there are no error messages or problems
with queries.

The problem occurs when connecting with
$conn = pg_Connect("192.168.0.1", "5432", "username" ,"***",
"name_db");
I get following error message:

Unable to connect to PostgresSQL server: pgReadData() -- backend
closed the channel unexpectedly. This probably means the backend
terminated abnormally before or while processing the request.

Log message:
Usage: /usr/lib/pgsql/bin/postgres [options] [dbname]
-A on enable/disable assert checking
[...]
-v version set protocol version being used by frontend

I searched all manuals and the archive, but I have no ideas.

Thanks,
Catharina

*******************************************************************
hba.conf file entry:
local all trust
host all 127.0.0.1 255.255.255.255 trust
host all 192.168.0.0 255.255.255.0 trust

catha(at)server:~ > ps aux |grep pgsql
postgres 1664 0.0 1.6 5180 1012 ? S Dec05 0:00
/usr/lib/pgsql/bin/postmaster -i -o -F -D/var/lib/pgsql/data

catha(at)server:~ > netstat -an |grep 5432
tcp 0 0 0.0.0.0:5432 0.0.0.0:*
LISTEN
unix 0 [ ACC ] STREAM LISTENING 166
/tmp/.s.PGSQL.5432

catha(at)server:~ > ipcs

------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00280267 772 root 644 1048576 0

------ Semaphore Arrays --------
key semid owner perms nsems status
0x00280269 514 root 666 14

------ Message Queues --------
key msqid owner perms used-bytes messages

--
Hempels Straßenmagazin im Internet: http://www.hempels-ev.de

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Pronakis 1999-12-15 11:07:03 Stable version
Previous Message Rodolphe QUIEDEVILLE 1999-12-15 09:30:22 ORDER BY Problem