test Pear

Do you have questions regarding Pecl or Pear? ask here!

Moderators: egami, macek, gesf

Post Reply
User avatar
php-forum Fan User
php-forum Fan User
Posts: 50
Joined: Sun May 29, 2005 8:31 pm

Tue Jul 19, 2005 1:00 am

hi all

I just installed pear in testing directory by go_pear.php.
I started testing the program but the result was returned the empty page.

Code: Select all


require_once 'PEAR/DB.php';
$user = 'root';
$pass = 'root';
$host = 'localhost';
$db_name = 'test';

// Data Source Name
$dsn = "mysql://$user:$pass@$host/$db_name";

$db = DB::connect($dsn);

if (DB::isError($db)) {
        die ($db->getMessage());
} else {
		echo 'Connected successfully';

please explain me


best regards
Post Reply