From: | Matthew Terenzio <matt(at)jobsforge(dot)com> |
---|---|
To: | Vince <vincej(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: PHP pg_connect |
Date: | 2007-07-17 19:57:50 |
Message-ID: | dda6c47463e39307f3c1a48178230c04@jobsforge.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Jul 17, 2007, at 3:13 AM, Vince wrote:
> 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.
If I understand correctly:
http://us.php.net/manual/en/function.pg-result-error.php
>
> Thanks,
> Vince.
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
From | Date | Subject | |
---|---|---|---|
Next Message | mljv | 2007-07-17 22:07:35 | Re: int8 vs int4 |
Previous Message | PFC | 2007-07-17 17:42:37 | Re: yet another image: db or filesystem ? question |