X-Original-To: pgsql-novice-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id C75F8D1C4C1; Mon, 28 Jul 2003 02:23:32 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 54903-10; Sun, 27 Jul 2003 23:22:42 -0300 (ADT) Received: from mailav.tor1.inquent.com (mail.inquent.com [216.208.117.106]) by svr1.postgresql.org (Postfix) with ESMTP id 1385FD1C4BB; Sun, 27 Jul 2003 23:23:31 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mailav.tor1.inquent.com (Postfix) with ESMTP id 4B0051024D; Sun, 27 Jul 2003 22:16:25 -0400 (EDT) Received: from [192.168.1.200] (dyn-133-81.tor.dsl.tht.net [134.22.133.81]) by mailav.tor1.inquent.com (Postfix) with ESMTP id E41CA10248; Sun, 27 Jul 2003 22:16:22 -0400 (EDT) Subject: Re: [PHP] Accessing Postgres db from apache using PHP From: Rod Taylor To: bedouglas@earthlink.net Cc: pgsql-novice@postgresql.org, pgsql-php@postgresql.org In-Reply-To: <001501c354a3$9aee0b40$0301a8c0@Mesa.com> References: <001501c354a3$9aee0b40$0301a8c0@Mesa.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-tFmKkhM80RDC3ZXQmVbz" Message-Id: <1059359048.8643.13.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.3 Date: 27 Jul 2003 22:24:08 -0400 X-Virus-Scanned: by AMaViS perl-11 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/264 X-Sequence-Number: 7799 --=-tFmKkhM80RDC3ZXQmVbz Content-Type: text/plain Content-Transfer-Encoding: quoted-printable > i then do a: > $tmp =3D "host=3Dlocalhost dbname=3Dgforge user=3Dgforge password=3Dgfor= ge"; > $conn =3D @pg_connect($tmp); Since host=3Dlocalhost, the client will attempt to connect to the server on 127.0.0.1. By default, TCPIP access is not enabled. To do so, see postgresql.conf, make the change to the tcpip variable, and HUP the server. However, if you leave host=3D, the client will attempt to connect to the server via the local domain socket which is both enabled by default and should be a touch faster due to more efficient data transmission. --=-tFmKkhM80RDC3ZXQmVbz Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQA/JIlH6DETLow6vwwRAqzkAJ9q4v40uaEksJjFAnxpkQh0PNZzdwCfVFwR +WrxDdusclX8kUiCxlURpVQ= =NwvQ -----END PGP SIGNATURE----- --=-tFmKkhM80RDC3ZXQmVbz--