Re: php password authentication failed for user ...

Поиск
Список
Период
Сортировка
От Bill Moran
Тема Re: php password authentication failed for user ...
Дата
Msg-id 20140709071432.ec700ad41288c3972ecbe4cb@potentialtech.com
обсуждение исходный текст
Ответ на php password authentication failed for user ...  (basti <mailinglist@unix-solution.de>)
Ответы Re: php password authentication failed for user ...  (basti <mailinglist@unix-solution.de>)
Список pgsql-general
On Wed, 09 Jul 2014 13:04:19 +0200 basti <mailinglist@unix-solution.de> wrote:

> Hello my pg_hab.conf has this entry:
>
> host    all             all             127.0.0.1/32            md5
>
> When I try to use PHP to connect to the Database I get
>
> "postgres password authentication failed for user ..."
>
> The PHP-code looks like
>
>
> global $dbhost, $dbuser, $dbpass, $dbname, $use_pgsql, $dbconn;
>
> if ($use_pgsql)
> {
>         $connect = "host=$dbhost user=$dbuser password=$dbpass
> dbname=$dbname";
>         echo $connect;
>         if (!($dbconn = pg_connect($connect)))
>         {
>                 open_page();
>                 ErrSQL("Unable to connect to database.");
>         }
>
> When I try to connect via
> psql -U user  -h localhost -W database
> I can connect without error.
>
> I also use SSL connections, is this the problem? or in other words is
> there a way to connect php via (postgres) ssl?

Have you tried using sslmode or requiressl in the $connect string?

--
Bill Moran <wmoran@potentialtech.com>


В списке pgsql-general по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Insert query hangs
Следующее
От: Spiros Ioannou
Дата:
Сообщение: Re: Largely inconsistent query execution speed, involving psql_tmp