=?UTF-8?B?SmFyb23DrXIgS2FtbGVy?= <kamler(at)centrum(dot)cz> writes:
> But web browser writes this error:
> Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: password authentication failed for user "***" FATAL: password authentication failed for user "***" in /var/www/test/index.php on line 6 Warning: pg_last_error(): No PostgreSQL link opened yet in /var/www/test/index.php on line 7 Could not connect:
What it looks like is your script isn't supplying the right password.
> When I delete in PHP script in pg_connect host="localhost", then all
> works fine, because I use UNIX domain socket (I am thinging ...),
You've got auth method set to "trust" for local connections, so in that
case it's not going to matter whether the script has the right password.
regards, tom lane