problem:beginner connecting to database with pear

hello,

i am trying to work with pear.

i have made a script to connect to a database, but i get the following error
message:

Cannot connect: DB Error: connect failed


i checked de ini-file for the include path, this is correct:
include_path = ".;C:\Program Files\xampp\php\pear\"

the name of the database i want to connect to is 'products'.

(instead of username i have used a username, and instead of password i have
used a password)

------------ source code --------------

require_once("DB.php");

$dsn = "mysql://username:password [at] localhost/products";

$conn =DB::connect ($dsn);
if (DB::isError ($conn))
die ("Cannot connect: " . $conn->getMessage () . "\n");

--------------------------------------------------

i have no idea what i am doing wrong.


thanks,

henri
Osewoudt [ Di, 16 Januar 2007 16:06 ] [ ID #1597311 ]
PHP » alt.php » problem:beginner connecting to database with pear

Vorheriges Thema: max_execution_time ignored, multiple Apache processes spawned
Nächstes Thema: Re: trim invisible chars