That was it. Running buildconf should create the standard configure script that can be used to set your options for PHP. In a normal installation, PEAR should be installed automatically under /usr/local/lib/php, but you can still build the files manually by going into php4/pear and running make install-su as a superuser.

Besides that, you should add the PEAR root directory to the include_path found in your php.ini file. The default path should be /usr/local/lib/php, but it may be elsewhere if you did some manual changes to your configure options.

Starting up with PEAR

PEAR packages can range from database abstraction layers to output cache systems, so PEAR is much more than a simple library -- it is a new standard of writing portable and clean PHP code. One of the most important things for a PEAR newcomer to do is to read the coding
standards that are published in the PHP manual.

I'll give some tips on how to start working with PEAR::DB, because it is
one of the most popular PEAR packages. You can get examples and help on
how to use PEAR::DB by following these steps:

Search MARC under PEAR-DEV or PEAR-GENERAL for answers to your questions.

Read the unit-test scripts provided with the source code of PEAR. The location of these scripts can be found in the directory where your PHP CVS source is. In my case, it was /home/jpm/php4/pear/DB/tests/.

I hope this article has shed some light on the semi-mysterious PEAR library, and that it has provided you with some useful background information on one of the more promising developments in the PHP community.

Enjoy!

Joao Prado Maia
is a web developer living in Houston with more than four
years of experience developing web-based applications and
loves learning new technologies and programming languages.