no such database
| From: | Brad Hubbard | Date: | Sun, 02 Feb 2003 01:48:47 +0000 |
| Subject: | no such database | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-25332@lists.php.net to get a copy of this message | ||
Red Hat 8.0
php-4.2.2-8.0.5
postgresql-7.2.2-1
I've used the PEAR DB classes quite a lot in the past but have moved to a new
machine and have encountered a bit of a perplexing problem.
the following code generates the error;
DB Error: no such database
<?php
require_once 'DB.php';
$dsn = 'pgsql://fred:nurk@unix+localhost/tryme';
$db = DB::connect( $dsn );
if( DB::isError( $db ) )
{
die( $db->getMessage()." ".__FILE__." ".__LINE__."\n" );
exit;
}
?>
I KNOW that the user, password and database are for real cause I can connect
from the command line using "psql tryme -U fred".
Any ideas?
TIA,
Brad