Re: [GENERAL] No pg_hba.conf entry ???
От | Jim Mercer |
---|---|
Тема | Re: [GENERAL] No pg_hba.conf entry ??? |
Дата | |
Msg-id | 20000221120023.P365@reptiles.org обсуждение исходный текст |
Ответ на | No pg_hba.conf entry ??? ("Paulo Parola" <pgsql@brazilinfo.com>) |
Список | pgsql-general |
> The command to connect inside the script is the following: > > if ( !($pgconn = pg_connect("localhost", "5432", "", "", "photos")) ) > { > echo "Bad connection to database!<p>Sorry<p>.\n"; > } > > My 'pg_hba.conf' is located inside directory 'data' below > > local all trust > host all 127.0.0.1 255.255.255.255 trust hmmm, i should have looked closer than i did before replying. if the scripts are running on the same machine as the database, then it should work fine as above. if the scripts are running on a different machine, then the php code needs to be changed to use: > if ( !($pgconn = pg_connect("xxx", "5432", "", "", "photos")) ) where xxx is the name or ip address of the database server. the database server would need a pg_hba.conf entry like: > host all xxx 255.255.255.255 trust where xxx is the ip address of the machine running the scripts. -- [ Jim Mercer jim@reptiles.org +1 416 506-0654 ] [ Reptilian Research -- Longer Life through Colder Blood ] [ Don't be fooled by cheap Finnish imitations; BSD is the One True Code. ]
В списке pgsql-general по дате отправления: