Skip site navigation (1) Skip section navigation (2)

Re: Undefined function pg_connect()

From: Gustavo Amarilla Santacruz <gusamasan(at)gmail(dot)com>
To: Chris <dmagick(at)gmail(dot)com>
Cc: Bill Moran <wmoran(at)potentialtech(dot)com>, pgsql-php(at)postgresql(dot)org
Subject: Re: Undefined function pg_connect()
Date: 2010-02-02 00:54:33
Message-ID: e4ea2d811002011654v6b29236bi33119e60691e1e3a@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-php
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(at)gmail(dot)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(at)gmail(dot)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?

In response to

pgsql-php by date

Next:From: Thom BrownDate: 2010-02-10 12:04:23
Subject: PHP and PostgreSQL boolean data type
Previous:From: Gustavo Amarilla SantacruzDate: 2010-02-02 00:51:00
Subject: Re: Undefined function pg_connect()

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group