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

Re: [PHP] Accessing Postgres db from apache using PHP

From: "bruce" <bedouglas(at)earthlink(dot)net>
To: "'Rod Taylor'" <rbt(at)rbt(dot)ca>
Cc: <pgsql-novice(at)postgresql(dot)org>, <pgsql-php(at)postgresql(dot)org>
Subject: Re: [PHP] Accessing Postgres db from apache using PHP
Date: 2003-07-28 16:13:27
Message-ID: 003201c35523$2e386510$0301a8c0@Mesa.com (view raw or flat)
Thread:
Lists: pgsql-novicepgsql-php
Rod....

psql -V shows that I have a 7.2.2 version....

I did restart the postgres server by using the services GUI provided by
RH...

I'm not sure what "HUP" is!!!!

I also have the "-i" added to the postgresql file which should permit TCP/IP
connections....

This is most frustrating..as I'm pretty sure it's a simple issue...!!!

Rod.... If you don't mind... What's your phone number... You seem to be
reasonably knowledgeable... If we spoke, I might be able to get the
proverbial light going off!!

Thanks

Bruce
bedouglas(at)earthlink(dot)net


-----Original Message-----
From: Rod Taylor [mailto:rbt(at)rbt(dot)ca]
Sent: Monday, July 28, 2003 4:47 AM
To: bedouglas(at)earthlink(dot)net
Cc: pgsql-novice(at)postgresql(dot)org; pgsql-php(at)postgresql(dot)org
Subject: RE: [PHP] Accessing Postgres db from apache using PHP


> my pg_hba.conf looks like:
> # TYPE     DATABASE    IP_ADDRESS    MASK               AUTH_TYPE
> AUTH_ARGUMENT
>
> #local      all                                          trust
> #host       all         127.0.0.1     255.255.255.255    trust
>
> # Using sockets credentials for improved security. Not available
everywhere,
> # but works on Linux, *BSD (and probably some others)
>
> #local  all ident   sameuser
> #local   all                                             trust
> #host   all             127.0.0.1       255.255.255.255 trust
> #host   template1       127.0.0.1       255.255.255.255 trust
> host    gforge  127.0.0.1       255.255.255.255 trust
>
> i've logged into the server as gforge, and tried to do the psql command
> 	-> psql -h localhost gforge
>
> psql: FATAL 1:  No pg_hba.conf entry for host 127.0.0.1, user gforge,
> database gforge

Your using a 7.2.x database or 7.3.x?

The file segments you have shown look like the 7.2.x format but the
error message looks like something you would get out of a 7.3.x database
(7.3.x added a user portion).

If 7.3.x, try:

# TYPE DATABASE USER    IP-ADDRESS IP-MASK         METHOD
host   gforge   gforge  127.0.0.1  255.255.255.255 trust


If 7.2.x, did you HUP or restart the server after making changes to the
file?


In response to

pgsql-novice by date

Next:From: bruceDate: 2003-07-28 16:32:16
Subject: Re: Accessing Postgres db from apache using PHP
Previous:From: Rod TaylorDate: 2003-07-28 11:47:26
Subject: Re: [PHP] Accessing Postgres db from apache using PHP

pgsql-php by date

Next:From: bruceDate: 2003-07-28 16:32:16
Subject: Re: Accessing Postgres db from apache using PHP
Previous:From: Rod TaylorDate: 2003-07-28 11:47:26
Subject: Re: [PHP] Accessing Postgres db from apache using PHP

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