From: Gustavo Amarilla Santacruz <gusamasan@gmail.com>
To: Chris <dmagick@gmail.com>
Cc: Bill Moran <wmoran@potentialtech.com>
Cc: pgsql-php@postgresql.org
Subject: Re: Undefined function pg_connect()
Date: Mon, 1 Feb 2010 21:54:33 -0300
Message-ID: <e4ea2d811002011654v6b29236bi33119e60691e1e3a@mail.gmail.com> (raw)
In-Reply-To: <e4ea2d811002011651i451f7939q8eb0a34d4b38d5be@mail.gmail.com>
References: <e4ea2d811001271625r21024e05s5b74340b322b85d5@mail.gmail.com>
<20100128084415.4d98823a.wmoran@potentialtech.com>
<e4ea2d811001281540x4e9f2eabp9557ea36e8f0bcbf@mail.gmail.com>
<4B62236F.1090200@gmail.com>
<e4ea2d811001291707l62c3c8ccs4a74b9d95a43bc8b@mail.gmail.com>
<e4ea2d811001300433l7d466afdt8fa40bf4bc5fd0e8@mail.gmail.com>
<4B660281.5060007@gmail.com>
<e4ea2d811002011603u98f5fd4k6934d68fc66bb352@mail.gmail.com>
<4B676E2D.5060903@gmail.com>
<e4ea2d811002011651i451f7939q8eb0a34d4b38d5be@mail.gmail.com>
I am sorry. Please, ommit the previous post.
The correct post is the following:
Thank you, Chris.
The pg_hba.conf file contained this:
# 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
After, i modified it 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 from php scripts. But, how i Know that apache is using
IPV6 connections?
On Mon, Feb 1, 2010 at 9:51 PM, Gustavo Amarilla Santacruz <
gusamasan@gmail.com> wrote:
> 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 <dmagick@gmail.com> 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 psql
>>> 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/
>>
>>
>
>
> --
> Gustavo Amarilla
>
> ¿Reciclaste papel, hoy?
>
--
Gustavo Amarilla
¿Reciclaste papel, hoy?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: gusamasan@gmail.com, dmagick@gmail.com, wmoran@potentialtech.com
Subject: Re: Undefined function pg_connect()
In-Reply-To: <e4ea2d811002011654v6b29236bi33119e60691e1e3a@mail.gmail.com>
References: <e4ea2d811001271625r21024e05s5b74340b322b85d5@mail.gmail.com> <20100128084415.4d98823a.wmoran@potentialtech.com> <e4ea2d811001281540x4e9f2eabp9557ea36e8f0bcbf@mail.gmail.com> <4B62236F.1090200@gmail.com> <e4ea2d811001291707l62c3c8ccs4a74b9d95a43bc8b@mail.gmail.com> <e4ea2d811001300433l7d466afdt8fa40bf4bc5fd0e8@mail.gmail.com> <4B660281.5060007@gmail.com> <e4ea2d811002011603u98f5fd4k6934d68fc66bb352@mail.gmail.com> <4B676E2D.5060903@gmail.com> <e4ea2d811002011651i451f7939q8eb0a34d4b38d5be@mail.gmail.com> <e4ea2d811002011654v6b29236bi33119e60691e1e3a@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox