php password authentication failed for user ... - Mailing list pgsql-general

From basti
Subject php password authentication failed for user ...
Date
Msg-id 53BD21B3.7040307@unix-solution.de
Whole thread Raw
Responses Re: php password authentication failed for user ...  (Bill Moran <wmoran@potentialtech.com>)
Re: php password authentication failed for user ...  (Francisco Olarte <folarte@peoplecall.com>)
Re: php password authentication failed for user ...  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: php password authentication failed for user ...  (Scott Marlowe <scott.marlowe@gmail.com>)
List pgsql-general
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?

Regards,
basti


pgsql-general by date:

Previous
From: M Tarkeshwar Rao
Date:
Subject: Re: Insert query hangs
Next
From: Greg Stark
Date:
Subject: Re: Insert query hangs