|
Posted by Osewoudt on 01/16/07 15:06
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@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
Navigation:
[Reply to this message]
|