Re: Installing PEAR

From: Date: Sun, 11 May 2008 18:51:48 +0000
Subject: Re: Installing PEAR
References: 1 2 3 4 5 6  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-28910@lists.php.net to get a copy of this message
Running <?php require_once 'PEAR.php'; ?> generates no errors. But I am unable to run PEAR from the command line. When I execute the command, I get a message that reads, "-bash: pear: command not found". Is there are "pear.exe" file whose location needs to be added to my server's PATH variable? If so, how do I add it to my PATH? I tried adding the following line to my "root" user's ".bashrc" file then logging off and logging back in. "export PATH=$PATH:/path/to/PEAR/executable/ But that did not work. It appears "pear" (I assume this is the name of the PEAR executable) is located in "/path/to/web/server/root/directory/bin/". Lastly, I installed the "Date" PEAR package, and it seems to be working properly. Osei On Sun, May 11, 2008 at 12:32 PM, Christian Weiske <cweiske@cweiske.de> wrote: > Hello Osei, > > > > Are you implying that if I add the directory that I installed PEAR > > into to my php.ini's include_path, then I can have all of my virtual > > hosts access the one instance of PEAR? > Exactly. > > > If so, I see where you are > > coming from. I tried that, but I am still having trouble verifying > > that PEAR is working. > > > > Is there are PEAR executable whose path I should include in the > > "include_path" directive? I currently have the directory that > > contains "Config.php", "pearfrontendweb.php", and "PEAR.php" > > added to > > my "include_path". Also, if it helps any, I get an error that > > "PEAR/Frontend.php" cannot find the PEAR class when I run > > "PEAR/pearfrontendweb.php" from a Web browser. > > You should add the directory you installed PEAR into to your include > path. You get it via "pear config-get php_dir" on the command line. > Once this is done, pear should work. You can try this out by installing > any package and try to use it. Further, a simple test is to create a > file in one of your hosts that just does: > > <?php > require_once 'PEAR.php'; > ?> > > If that brings no error, your pear installation seems to be ok. > > > Please keep the discussion on-list. > > -- > Regards/Mit freundlichen Grüßen > Christian Weiske >

« previous php.pear.general (#28910) next »