I'm having a real problem installing PEAR DB on a ubuntu system. I've installed all the packages but whenever I execute the following script I get an error:
Code:
<?php
//DB Config
require_once 'DB.php';
$user = 'ticket';
$pass = '***';
$host = 'localhost';
$db_name = 'ticket';
$dsn = "mysql://$user:$pass@$host/$db_name";
$db = DB::connect($dsn, false);
$db->disconnect();
?>
Error: Fatal error: Call to undefined method DB_Error::disconnect() in /var/www/ticket/libs.php on line 9
Where am I going wrong?
pear list:
Code:
Installed packages, channel pear.php.net:
=========================================
Package Version State
Archive_Tar 1.3.2 stable
Console_Getopt 1.2.3 stable
DB 1.7.13 stable
PEAR 1.6.1 stable
Structures_Graph 1.0.2 stable