For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > April 2006 > Re: [PEAR] Beginning with PEAR









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] Beginning with PEAR
Olivier Guilyardi

2006-04-25, 7:04 pm

Hi Romain,

Romain SEGUY wrote:
>
> *Fatal error*: Undefined class name 'pear' in
> */var/virtual_www/libenti.com/ln.dev.libenti.com/htdocs/classes/CBDDUtilisateurs.php*
> on line *7*
>
> I feel like there's some "include" statement missing... I searched
> everywhere in the manual and with Google and found absolutely no hint.


When you use PEAR packages you should usually start with :

require_once 'PEAR.php';

That's often implicit in the manual examples.

--
og
Scott Mattocks

2006-04-25, 7:04 pm

Olivier Guilyardi wrote:
>
> When you use PEAR packages you should usually start with :
>
> require_once 'PEAR.php';
>


Actually, if you are trying to use DB_DataObject, you should have:

require_once 'DB/DataObject.php';

If DB_DataObject needs the PEAR class, it will have the needed require
statement. If you still get these errors, make sure that /usr/share/pear
is in your include path.

--
Scott Mattocks
Author of: Pro PHP-GTK
http://www.crisscott.com
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com