Section 10.1. Introduction


10.1. Introduction

This book mentioned PEAR a few times in the preceding chapters. PEAR, short for PHP Extension and Application Repository, is a package system for PHP. During version 4 of PHP, the number of users exploded, and so did the number of code snippets you could download from different web sites. Some of these sites offered code that you had to copy and paste into your editor, while others let you download archives with source files. This was useful to many people, but there was a need for a better way of sharing and re-using PHP code, similar to Perl's CPAN.

The PEAR project set out to solve this problem by providing an installation and maintenance tool and code/release management standards. Today, PEAR provides

  • The PEAR Installer (a package-management tool)

  • Packages with PHP library code

  • Packages with PHP extensions (PECL)

  • PEAR coding standards, including a versioning standard

A spin-off from the PEAR project is PECL, the PHP Extension Community Library. PECL used to be a subset of PEAR, but today, it is managed separately. This means that PECL has its own web site, mailing lists, administrative routines, and so on.

However, PEAR and PECL share tools and infrastructure: Both use the PEAR Installer, both use the same package format, and both use the same versioning standard.

The coding standard is different however: PECL follows the PHP coding standard (for C code), while PEAR has its own.

In this chapter, you are first introduced to PEAR through its terminology and concepts. The rest of this chapter covers using the PEAR Installer to install and manage packages on your site.

After you finish reading this chapter, you will have learned

  • Make sense of PEAR's package concept and how PEAR packages compare to other package formats

  • Obtain the command-line PEAR Installer in UNIX/Linux, Windows, and Darwin

  • Install, upgrade, and uninstall packages

  • Configure the PEAR Installer

  • Obtain and use the desktop (Gtk) PEAR Installer

  • Obtain and use the PEAR Web Installer

  • Interpret PEAR version numbers



    PHP 5 Power Programming
    PHP 5 Power Programming
    ISBN: 013147149X
    EAN: 2147483647
    Year: 2003
    Pages: 240

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net