X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 528FDD1B215 for ; Mon, 24 May 2004 10:45:20 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 25720-10 for ; Mon, 24 May 2004 10:45:02 -0300 (ADT) Received: from tomts20-srv.bellnexxia.net (tomts20-srv.bellnexxia.net [209.226.175.74]) by svr1.postgresql.org (Postfix) with ESMTP id 1C6DCD1B211 for ; Mon, 24 May 2004 10:44:55 -0300 (ADT) Received: from acer.sympatico.ca ([65.95.129.143]) by tomts20-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20040524134457.PJAW26030.tomts20-srv.bellnexxia.net@acer.sympatico.ca> for ; Mon, 24 May 2004 09:44:57 -0400 Message-Id: <5.2.1.1.0.20040524084521.02b48060@pop6.sympatico.ca> X-Sender: b1wudu74@pop6.sympatico.ca X-Mailer: QUALCOMM Windows Eudora Version 5.2.1 Date: Mon, 24 May 2004 09:37:19 -0400 To: pgsql-php@postgresql.org From: Frank Bax Subject: unable to connect to pgsql server Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.2 tagged_above=0.0 required=5.0 tests=RCVD_IN_NJABL, RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200405/46 X-Sequence-Number: 2765 I have a working system on OpenBSD 2.9 / PHP 4.0.4pl1 / pgsql 7.1 / phplib 7.4 I created a new system on OpenBSD 3.5 / PHP 4.3.5RC3 / pgsql 7.3.5 / phplib 7.4 I copied an existing database and php/phplib application to the new box for testing, but when I try to access the application webpage, I get the following message in apache error log: PHP Warning: pg_connect(): Unable to connect to PostgreSQL server: unknown host name: localhost in /php/class/phplib-7.4/db_pgsql.inc on line 51 Line 51 of db_pgsql.inc calls pg_connect (obviously?). Since all code came from a working system, I think I missed something during setup, but I'm not sure what that might be. Based on similar questions in archives, I think this info is relevant: # cat /var/pgsql/data/postgresql.conf | grep -v ^# | grep -v ^$ tcpip_socket = true shared_buffers = 512 LC_MESSAGES = 'C' LC_MONETARY = 'C' LC_NUMERIC = 'C' LC_TIME = 'C' # cat /var/pgsql/data/pg_hba.conf | grep -v ^# local all all trust host all all 127.0.0.1 255.255.255.255 trust # cat /etc/hosts | grep -v ^# ::1 localhost 127.0.0.1 localhost Frank