I have included the same in /etc/php.ini.
And i have written a samble db connectivity script. It does not display anything in the browser. Just a blank page appears. My php script is below:
?php
// The pear base directory must be in your include_path
echo require_once 'DB.php';
require_once 'DB.php';
$user = 'sailaja';
$pass = 'google';
$host = 'localhost';
$db_name = 'login_test';
// Data Source Name: This is the universal connection string
$dsn = "mysql://$user:$pass@$host/$db_name";
// DB::connect will return a Pear DB object on success
// or a Pear DB Error object on error
// You can also set to TRUE the second param
// if you want a persistent connection:
// $db = DB::connect($dsn, true);
$db = DB::connect($dsn);
// With DB::isError you can differentiate between an error or
// a valid connection.
if (DB::isError($db)) {
die ($db->getMessage());
}
// Once you have a valid DB object
$sql = "select * from login_app";
// If the query is a "SELECT", $db->query will return
// a DB Result object on success.
// Else it simply will return a DB_OK
// On failure it will return a DB Error object.
$result = $db->query($sql)