O'Reilly logo

Learning PHP and MySQL by Jon A. Phillips, Michele E. Davis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using PEAR

PEAR is a framework and distribution system for reusable PHP components. Actually, PEAR is a collection of add-on functionality for PHP development. There are many modules available to handle everything from session management to shopping cart functionality. Modules that are currently available are listed in Table 9-1.

Table 9-1. PEAR modules

Authentication

HTML

Processing

Benchmarking

HTTP

Science

Caching

Images

Semantic Web

Configuration

Internationalization

Streams

Console

Logging

Structures

Database

Mail

System

Date/Time

Math

Test

Encryption

Networking

Tools & Utilities

Event

Numbers

Validate

File Formats

Payment

Web Services

File System

PEAR

XML

GTK Components

PHP

 

Our list is not complete. Visit http://pear.php.net to find out all of the modules that are available for download.

Installing

PEAR uses a Package Manager to manage which PEAR features you install. Whether you need to install the Package Manager depends on which version of PHP you installed. If you're running PHP 4.3.0 or newer, it's already installed. If you're running PHP 5.0, PEAR has been split out into a separate package. The DB package that you're interested in is also installed by default with the Package Manager. So if you have the Package Manger, you're all set.

Unix

You can install the Package Manager on a Unix system by executing the following from the shell (command-line) prompt:

lynx -source http://go-pear.org/ | php

This takes the output of the go-pear.org ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required