note 6892 modified in function.pg-connect by ronabop
| From: | ronabop@php.net | Date: | Tue, 04 Feb 2003 04:31:30 +0000 |
| Subject: | note 6892 modified in function.pg-connect by ronabop | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-43363@lists.php.net to get a copy of this message | ||
If you use PostgreSQL users for authenticating into your pg database rather than using your own
authentication, always specify host directive in pg_connect and edit pg_hba.conf to authenticate
from this host accordingly. Otherwise, PHP will connect as 'local' using UNIX domain
sockets, which is set in pg_hba.conf to 'trust' by default (so you can connect using psql
on console without specifying password) and everyone can connect to db _without password_ .
--was--
Just a note:
<BR>
If you use PostgreSQL users for authenticating into your pg database rather than using your own
authentication, always specify host directive in pg_connect and edit pg_hba.conf to authenticate
from this host accordingly. Otherwise, PHP will connect as 'local' using UNIX domain
sockets, which is set in pg_hba.conf to 'trust' by default (so you can connect using psql
on console without specifying password) and everyone can connect to db _without password_ .
http://www.php.net/manual/en/function.pg-connect.php