Hi!
On a Red Hat Linux 7.3 system with PostgreSQL 7.3.3, I am having a
problem connecting to the database, using PEAR/PHP code in a web page.
The code I have worked out so far is:
$dsn = array('phptype' => 'pgsql',
'username' => 'simpatic_www',
'password' => 'gottago',
'hostspec' => 'localhost',
'database' => 'simpatic_logbook'
);
$options = array('debug' => 2,
'portability' => DB_PORTABILITY_ALL
);
$db =& DB::connect($dsn, $options);
if (DB::isError($db)) { die($db->getMessage()); }
Only the password has been changed to protect the guilty. The user
'simpatic_www' is created by CPANEL webhosting software's control panel.
As an attempt to check correctness of the password, I logged into the
simpatic_logbook database as the postgres user (superuser?) and typed:
simpatic_logbook=# alter user simpatic_www with password 'gottago';
ALTER USER
So in theory it succeeded. Connect still fails, though. What gets me is
that *all* I get is that one "DB Error: connect failed" error. Is there
a way to get more detail, so I at least know exactly *why* it is
failing? Can I get psql to show me simpatic_www's unencrypted password
to see what it has?
Thanks for any pointers,
--
Rodolfo J. Paiz <rpaiz@simpaticus.com>