Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id EE7836331C0 for ; Mon, 1 Feb 2010 20:51:32 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 21628-05 for ; Tue, 2 Feb 2010 00:51:22 +0000 (UTC) X-Greylist: delayed 00:47:25.739867 by SQLgrey-1.7.6 Received: from mail-ww0-f46.google.com (mail-ww0-f46.google.com [74.125.82.46]) by mail.postgresql.org (Postfix) with ESMTP id 1B9066330F3 for ; Mon, 1 Feb 2010 20:51:21 -0400 (AST) Received: by wwi18 with SMTP id 18so666993wwi.19 for ; Mon, 01 Feb 2010 16:51:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=jsT/b/eMYNC4uTcTsT7cw/yeD9geksV75gVQcGUpkVg=; b=xEg5hv6tTiyTiJAw6wLrDnwVAAUnrweZ1+NG/msL2WBV+1NCCvdq9bPb0JWyGDjuMs 2ZZcjUE8s7FuC5CNQwvxbGZNXF3yHjqKW00FxemMU0IOO8EPAKfs/cq6m4LMrlWwuDhX n/FOcD0/zSlSXq3hcp8dVUqpyuqCFrXb2O2gs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=oJKrJf573MJQQ1g/gZndKGEnNjCF7Bs0qUrw6SzSDFOfxL7g84Lij6OvGeQhQ+YLSe T2AtMqovQsO9IUiAZMxQxAyP3oC78cL0ZQNYGzUW7gIAh4uRufa6qMOMREvPrkEaHPQD Vmkb0oPFIlIR/7aIAi16wbc1jkU13v/iDieZs= MIME-Version: 1.0 Received: by 10.216.90.67 with SMTP id d45mr3407298wef.42.1265071880163; Mon, 01 Feb 2010 16:51:20 -0800 (PST) In-Reply-To: <4B676E2D.5060903@gmail.com> References: <20100128084415.4d98823a.wmoran@potentialtech.com> <4B62236F.1090200@gmail.com> <4B660281.5060007@gmail.com> <4B676E2D.5060903@gmail.com> From: Gustavo Amarilla Santacruz Date: Mon, 1 Feb 2010 21:51:00 -0300 Message-ID: Subject: Re: Undefined function pg_connect() To: Chris Cc: Bill Moran , pgsql-php@postgresql.org Content-Type: multipart/alternative; boundary=0016e6d7df780852a3047e938054 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201002/3 X-Sequence-Number: 4123 --0016e6d7df780852a3047e938054 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thank you, Chris. The pg_hba.conf contained: # TYPE DATABASE USER CIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: host all all 127.0.0.1 255.255.255.0 trust # IPv6 local connections: host all all ::1/128 ident Before, i modified to: # TYPE DATABASE USER CIDR-ADDRESS METHOD # "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: host all all 127.0.0.1 255.255.255.0 trust # IPv6 local connections: host all all ::1/128 trust Then i can login me. But, how i Know that apache is using IPV6 connections? On Mon, Feb 1, 2010 at 9:13 PM, Chris wrote: > Gustavo Amarilla Santacruz wrote: > >> Thank you, all. >> >> I had access to the SELinux->Boolean; next, i check the option: >> >> "Allow HTTPD scripts and modules to connect to databases over the >> network". >> >> >> Then, a new message was displayed: >> >> Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: >> Ident authentication failed for user "gestock" ....... >> >> >> I can login with gestock data (user/password) through the postgresql psq= l >> tool. But from apache i can not. >> > > It's not using the password, it's just checking the username to see if > you're logged in as 'gestock' (but 'apache' is not 'gestock', hence the > error). > > What does your postgresql pg_hba.conf file look like? > > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > > --=20 Gustavo Amarilla =BFReciclaste papel, hoy? --0016e6d7df780852a3047e938054 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thank you, Chris.

The pg_hba.conf contained:

# TYPE=A0 DATABA= SE=A0=A0=A0 USER=A0=A0=A0=A0=A0=A0=A0 CIDR-ADDRESS=A0=A0=A0=A0=A0=A0=A0=A0= =A0 METHOD

# "local" is for Unix domain socket connections= only
local=A0=A0 all=A0=A0=A0=A0=A0=A0=A0=A0 all=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= trust
# IPv4 local connections:
host=A0=A0=A0 all=A0=A0=A0=A0=A0=A0=A0=A0 all= =A0=A0=A0=A0=A0=A0=A0=A0 127.0.0.1 255.255.255.0 trust
# IPv6 local conn= ections:
host=A0=A0=A0 all=A0=A0=A0=A0=A0=A0=A0=A0 all=A0=A0=A0=A0=A0=A0= =A0=A0 ::1/128=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ident


B= efore, i modified to:

# TYPE=A0 DATABASE=A0=A0=A0 USER=A0=A0=A0=A0=A0=A0=A0 CIDR-ADDRESS=A0=A0=A0= =A0=A0=A0=A0=A0=A0 METHOD

# "local" is for Unix domain soc= ket connections only
local=A0=A0 all=A0=A0=A0=A0=A0=A0=A0=A0 all=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 trust
# IPv4 local connections:
host=A0=A0=A0 all=A0=A0=A0=A0=A0=A0=A0=A0 all=A0=A0=A0=A0=A0=A0=A0=A0 127.0= .0.1 255.255.255.0 trust
# IPv6 local connections:
host=A0=A0=A0 all= =A0=A0=A0=A0=A0=A0=A0=A0 all=A0=A0=A0=A0=A0=A0=A0=A0 ::1/128=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 trust


Then i can login me. But, how = i Know that apache is using IPV6 connections?





--
Gustavo Ama= rilla

=BFReciclaste papel, hoy?
--0016e6d7df780852a3047e938054--