logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: pear db (installation?) problem: msg#00167

Subject: Re: pear db (installation?) problem
Hi Stijn,

Thanks very much for your advice.  Interestingly enough your suggestion of
creating a test file containing "<?php require_once ('PEAR.php'); ?>" lead
me to an interesting discovery.  I'm using the Zend development environment
and when I just copy your line and execute the file it all works perfectly
(and I can also execute a query on the database successfully like this),
but when I save the file in the root directory of my website and then run it
through localhost, it falls over with the same error.  Very strange.  Do you
think I should reinstall php as a subdirectory of my website?

Susie

"Stijn De Reede" <sjr@xxxxxxxxx> wrote in message
news:20021218194658.49522.qmail@xxxxxxxxxxxxxxx
> Susie Black wrote:
> > Having  installed Pear and the Pear DB package on Windows a number of
times
> > (using both go-pear and the pear batch file)  I'm persistently getting
this
> > error.
>
> I assume you also installed PEAR base class, since virtually every
> package is dependant on it.
>
> > "Debug Error: c:\php4\pear\DB\common.php line 29 - Class db_common:
Cannot
> > inherit from undefined class pear."
> >
> > on the line
> >
> > require_once("db.php");
>
> I think this is because the PEAR.php file isn't available. You should
> check that is installed in c:\php4\pear\PEAR.php. You could try creating
>   a test.php with "<?php require_once ('PEAR.php'); ?>" inside, to test
> if  PEAR.php is avaible in your include path.
>
> > What's slightly more perplexing is that I installed to c:\php. I've made
a
> > complete copy of my php & pear directories to c:\php4  - and tried
> > installing to that directory in the first place but predictably enough
this
> > makes no difference.
> >
> > The include path in my php.ini file reads
> >
> > include_path = ".;c:\php\pear"
>
> I've got no experience with running pear or even php on windows, but if
> your pear install dir is c:\php4\pear, shouldn't this be in your include
> path, instead of c:\php\pear.
>
> In fact, I believe pear can be installed in every directory, not just
> inside the php dir, also for example in c:\path\to\other\dir\pear. Just
> set your include path to include this.
>
> greets,
>
> Stijn de Reede
>
> >
> > The configuration, as set using  pear.bat is
> >
> > bin_dir         c:\php
> > doc_dir         c:\php4\do
> > ext_dir         c:\php\ext
> > master_server   pear.php.n
> > password        <not set>
> > php_dir         c:\php4\pe
> > preferred_state stable
> > username        <not set>
> > verbose         1
> >
> > and c:\php is in my environment path.
> >
> > Please could anyone tell me what I've done wrong or what else I need to
do
> > to make this work?
> >
> > Thanks is advance
> > Susie
> >
> >
>



-- 
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>