X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id B8BEBD1B432 for ; Mon, 1 Dec 2003 17:08:45 +0000 (GMT) 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 37482-09 for ; Mon, 1 Dec 2003 13:08:14 -0400 (AST) Received: from mck.abak.info.pl (host-213-25-17-172.olsztyn.mm.pl [213.25.17.172]) by svr1.postgresql.org (Postfix) with ESMTP id 6E4DED1D86A for ; Mon, 1 Dec 2003 13:08:10 -0400 (AST) Received: from mail by mck.abak.info.pl with scanned-mks (ABAK.info.pl Secure SMTP) id 1AQrWb-0000hy-00 for ; Mon, 01 Dec 2003 18:07:53 +0100 Received: from net.wmbr.com.pl ([195.116.72.86] helo=panoramix) by mck.abak.info.pl with asmtp (ABAK.info.pl Secure SMTP) id 1AQrWa-0000hk-00; Mon, 01 Dec 2003 18:07:53 +0100 Content-Type: text/plain; charset="iso-8859-1" From: Mariusz Pekala To: Subject: Re: Help Conecting to a database from PHP Date: Mon, 1 Dec 2003 17:53:43 +0100 User-Agent: KMail/1.4.3 References: <3219C8BE8C5DCB4E95503D8E6B0BE901682512@sred01exs.redcolombia.local> In-Reply-To: <3219C8BE8C5DCB4E95503D8E6B0BE901682512@sred01exs.redcolombia.local> Cc: "David Cruz Ramos" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200312011754.17463.skoot@qi.pl> X-Virus-Scanned: by mks_vir for linux X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/2 X-Sequence-Number: 2448 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello. David Cruz Ramos (pon 1. grudzien 2003 16:41): > And Apache and PHP are working well....I can make and use the PHP functio= ns > in my web pages. Recently I've downloaded and installed PostgreSQL 7.3.2, > [...] > nobody user in the table of the databse, and my pg_hba.conf seems to be ok > ( localhost all all trust ). The browser even not give any error or > something....it just don't work... Maybe some error messages are in logfiles? Where are log files for yout=20 postgresql and for your web server? I suppose you have used wrong format. The line in pg_hba.conf should read: host all all 127.0.0.1 255.255.255.255 trust > I think I'm using the function in the correct way: $conn =3D pg_connect > ("localhost","","","","mydbname"); If I remember correctly this form has been deprecated... > I've tried too: $conn =3D pg_connect ("dbname=3Dmydbname"); > [...] > I'm starting the database server in this way: > /usr/local/pgsql/bin/postmaster -i -D /usr/local/pgsql/data > > thanks.... > > does somebody know what can I do? I suppose you may safely drop listening on TCP/IP connections. "local"=20 connections should be fine. In that case insert a line into pg_hba.conf: local all all trust (...if you want to do it in fast but extremely unsecure way.) Connecting from PHP you may try to use explicit username, hovewer I think y= our=20 problem is in this pg_hba.conf's line with localhost. Even if your hba_conf is OK, have you enabled "tcpip_socket" in=20 postgresql.conf? Maybe there are conflicts with versions of modules used by PHP and your=20 postgres? Have you had an older version of PostgreSQL before? Have you=20 recompiled PHP, apache? Just guessing... - --=20 [http://skoot.qi.pl for GPG keys] "A computer programmer is someone who, when told to "Go to Hell", sees the "Go to", rather than the destination, as harmful." -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE/y3IxvkWo15WV1rkRAoGhAJ9l/mg/Pihier+tRELkAnO2s2fsjQCeLS9/ 15SYAofmao6ttL4ezWUIFLw=3D =3DEv/N -----END PGP SIGNATURE-----