Unix Technical Forum

DB Error: connect failed

This is a discussion on DB Error: connect failed within the pgsql Novice forums, part of the PostgreSQL category; --> Hi! On a Red Hat Linux 7.3 system with PostgreSQL 7.3.3, I am having a problem connecting to the ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Novice

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 08:28 PM
Rodolfo J. Paiz
 
Posts: n/a
Default DB Error: connect failed

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>


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:33 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com