PHP pg_connect

From: Vince <vincej(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: PHP pg_connect
Date: 2007-07-17 07:13:08
Message-ID: 8731effe0707170013w41ac4fe8pd779656aae0069ee@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

When this fails, I get a useful error print:

$dbconn = pg_connect($connection_str);

Ouput:

Warning: pg_connect() [function.pg-connect]: Unable to connect to
PostgreSQL server: FATAL: password authentication failed for user
"postgres1" in ...

How do I capture this error and handle the printing myself? I want to
be able to know why it failed... ie password in this case.

Thanks,
Vince.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hannes Dorbath 2007-07-17 07:45:46 Re: PHP pg_connect
Previous Message Richard Huxton 2007-07-17 07:03:26 Re: Limitations on 7.0.3?