I remember the quick install/test I did using PEAR and I kind of had a similar 
experience, but I figured out what the issue was for me.

PEAR installed perfectly but doing the pear install thing where it pulls the 
package down and puts it where it needs to put it, I was doing what you were 
doing "pear packagename" and it wasn't working.

What fixed it for me was adding the version number to the end of the name.  
Looks like PEAR DB is at 1.7.6, so try something like:

pear install db1.7.6

But it also sounds like maybe you're not getting the pear install to work 
properly too.  So maybe you need to fix something else before you get to this 
point.  Just wanted to mention it to prevent a potential extra frustration for 

Back to work for me.. working late on a Friday sucks.. so forgive me if I'm not 
entirely helpful.. just wanted to pass that nugget along in case it was useful.


= = = Original message = = =

I know this may be a bit off-topic, but I would like to use the PEAR library
to implement some of my database functions. Unfortunately, the PEAR
documentation is woefully incomplete and as a result i've been unable to
install it properly. Here's the procedure i went through:
PHP Version: 5.1.2
Apache Version: 2.0.55
MySQL Version: 5.0.18
Windows XP Pro
1. launch the go-pear batch file
2. select system-wide installation
3. use default install directories: (Seems fine to me since PHP is installed
into C:\PHP)
Installation Base ($prefix)             C:\PHP
Binaries Directory                        C:\PHP
PHP code Directory ($php_dir)      C:\PHP\pear
Documentation Directory              C:\PHP\pear\docs
Data Directory                             C:\PHP\pear\data
Tests Directory                            C:\PHP\pear\tests
Name of Configuration File            C:\WINDOWS\pear.ini
Path to CLI php.exe                     C:\PHP\.
4. The batch file tells me pear is installed
5. I add the environment variable via the PEAR_ENV.reg file
6. add the line "require db.php" and load to this message:
Warning: require(DB.php) [function.require
<http://localhost/function.require> ]: failed to open stream: No such file
or directory in C:\wwwroot\phpinfo.php on line 2
Fatal error: require() [function.require <http://localhost/function.require>
]: Failed opening required 'DB.php' (include_path='.;C:\PHP\pear') in
C:\wwwroot\phpinfo.php on line 2 
7. Figure DB might not be installed by default, so follow the website's
instructions by attempting to call it from the command line:
pear install db = not recognized as internal or external command, bla bla
c:\php\pear install db = see above
c:\php\pear\pear install db = see above
8. get annoyed, go back to phpinfo file, remove erroneous line and look for
references to PEAR, come up with the following (only) line:
  include_path                    ~.;C:\PHP\pear~.;
9. Go crazy, hit cute, fuzzy animals.
I apolagize for the length of my e-mail, but I know that being thorough
helps most of the time. Does anyone have any advice or ideas?

Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to