Jump to content

larry98765

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

larry98765's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi All, I'm a PHP intermediate, but a newbie with PEAR. Trying to get started using PEAR but having problems: i.e. When trying to use DB in a script: [code] require_once('DB.php'); [/code] but I get this error: [code]Fatal error: Undefined class name 'pear' in /usr/lib/php/DB.php on line 540[/code] That would tell me that DB is being found, but a dependency for DB (ostensibly PEAR) is not. So I go to command line and type: [code]pear package-dependencies DB[/code] and get: [code]Cannot open 'DB' for parsing[/code] I don't know exactly what that means but it doesn't sound good. (I tried running the same command as sudo). But when I do: [code]pear list[/code] everything seems peachy: [code] Installed packages, channel pear.php.net: ========================================= Package              Version State Archive_Tar          1.3.1   stable Console_Getopt       1.2     stable DB                   1.7.6   stable DB_Pager             0.7     stable DB_Table             1.2.1   stable Date                 1.4.6   stable HTML_Common          1.2.2   stable HTML_QuickForm       3.2.5   stable HTML_Template_IT     1.1.3   stable HTTP                 1.4.0   stable Mail                 1.1.9   stable Net_SMTP             1.2.8   stable Net_Socket           1.0.6   stable Net_UserAgent_Detect 2.1.0   stable PEAR                 1.4.7   stable PHPUnit              1.3.2   stable Pager                2.3.6   stable XML_Parser           1.2.7   stable XML_RPC              1.4.5   stable [/code] and no problems installing new modules either. It's just that when I try to run DB in a script, it can't seem to "find" the base PEAR class? So then just for kicks I add a second include, so it's like this: [code] require_once('PEAR.php'); require_once('DB.php'); [/code] which gives me this error: [code] Fatal error: Class db_error: Cannot inherit from undefined class pear_error in /usr/lib/php/DB.php on line 868 [/code] So now it's got the pear module but not the pear_error class? Any ideas? Thanks in advance.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.