Re: PEAR DB Error??

From: Date: Tue, 22 Jul 2003 18:45:49 +0000
Subject: Re: PEAR DB Error??
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6727@lists.php.net to get a copy of this message
Something is probably amiss in your code, specifically in the definition of $dsn. Could you provide a snippet of the code you wrote that calls the DB:: connect function?
We use the $dsn a lot and only get this error in one script. In a nutshell --
        $dbuser = 'the_DB_user';
        $dbpass = 'password';
        $dbhost = 'server_name'
        $dbname = 'DB_name';
        $dbtype = 'pgsql';
        $dsn = "$dbtype://$dbuser:$dbpass@$dbhost/$dbname";
        $db = DB::connect($dsn);
        if (DB::isError($db)) {
                //echo "$dsn";
                die ($db->getMessage());
        }
-- James 'Chip' Kaufman jkaufman@wamnet.com 651-256-5137 PGP key: 697D43DE -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Graham Clarke GrahamC@53Tech.com www.53Tech.com 603.643.9955

« previous php.pear.general (#6727) next »