Hello out there!
After installing PostgreSQL 7.1.2 (debian Linux 2.2.19) I've a whole bunch of
questions about connection configuration ;-)
1. Does Postgres for its tcp-socket make use of the hosts.access mechanism? If
yes, whats the correct service name in hosts.allow|deny? I tried some, but it
seems it doesn't work...
2. Can I use PAM-authentication for restricting the access to databases,
tables etc. Or is it necessary to manually put all unix-users in the pg_user
table also (with additional passwords and therefore a lot of administration
overhead ;-)
3. Is there a possible problem connecting to the postgres unix domain socket
with PHP4 (4.0.3pl1 on apache 1.3.9)?
If (in the php-file) I do a
$link = pg_connect("dbname=template1");
I get (in syslog)
apache: PHP Warning: Unable to connect to PostgreSQL server:
connectDB() -- connect() failed: Connection refused Is the postmaster
running at
'localhost' and accepting connections on Unix socket '5432'? in
/var/www/intern/phpPgAdmin/test.php on line 6
Of course, the postmaster is running and psql works fine. The socket itself
seems alright:
srwxrwxrwx 1 pgr pgr 0 Jun 10 18:22 tmp/.s.PGSQL.5432
-rw------- 1 pgr pgr 21 Jun 10 18:22
tmp/.s.PGSQL.5432.lock
If I do the same thing with the tcp-socket
$link = pg_connect("host=localhost port=5432 dbname=template1");
everything is ok...
Any suggestions?
Thanks a lot,
Claus Herwig