LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-23-2008, 02:20 PM   #1
Boffy
Member
 
Registered: Jul 2003
Location: Durham, UK
Distribution: Ubuntu 8.04
Posts: 419

Rep: Reputation: 30
Installing PEAR DB on Ubuntu


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
 
Old 08-24-2008, 04:31 AM   #2
Boffy
Member
 
Registered: Jul 2003
Location: Durham, UK
Distribution: Ubuntu 8.04
Posts: 419

Original Poster
Rep: Reputation: 30
Solved the problem myself. Turns out the login information was incorrect!

The way I found out was using a different error system:

Code:
if (PEAR::isError($db)) {
    die($db->getMessage()  . ', ' . $db->getDebugInfo());
}
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing PEAR on a system which is configured '--without pear' swiftguy121 Linux - Software 1 07-10-2007 07:45 PM
install Pear Net/SMTP, Pear Log and Pear DB modules cccc Debian 0 02-26-2007 08:33 AM
Problem Installing PEAR extensions Eduardain Linux - Software 1 09-09-2006 05:06 PM
question of installing php pear by apt Joe_Zhu Linux - Software 1 04-02-2004 01:04 AM
Installing PEAR on Mandrake 9.2 Moebius01 Linux - Newbie 0 11-24-2003 08:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration