Re: DB Error: connect failed [SOLVED]
От | Rodolfo J. Paiz |
---|---|
Тема | Re: DB Error: connect failed [SOLVED] |
Дата | |
Msg-id | 1107445105.5220.13.camel@rodolfo.gt.factorrent.com обсуждение исходный текст |
Ответ на | Re: DB Error: connect failed (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-novice |
On Thu, 2005-02-03 at 01:42 -0500, Tom Lane wrote: > Dunno about phpPgAdmin, but psql defaults to connecting through a Unix > socket, which doesn't have either of the above risks. > I *thought* I was connecting to the Unix socket, so of course such a thing should not have been a problem. I went back to the DSN array I had written after your message and (after a little trial and error) figured out to add "'protocol' => 'unix'" as one of the values in the array. The final (working) DSN array and connect process was: $dsn = array('phptype' => 'pgsql', 'username' => 'simpatic_www', 'password' => 'gottago', 'protocol' => 'unix', '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()); } The connect *appears* to have worked fine, since I then get a page with no database output (I've made no queries) but also no errors. So I'm guessing the connect is done... thanks! Of course, everything immediately broke again when I tried a query. But after a little time with the PEAR manual, and googling for bizarre errors I would never have expected, the thing works. I have a simple query that returns one value, but it's working! I now have only two small details that pique my curiosity: 1. What is "debug=2" and do I need it? Happy to RTFM... URL to FM? 2. What is the significance of "=&" instead of "="? I can't find an explanation anywhere. My thanks to everyone who has helped me get over this first hump in my PostgreSQL usage. -- Rodolfo J. Paiz <rpaiz@simpaticus.com>
В списке pgsql-novice по дате отправления: