PEAR Articles

  Home arrow PEAR Articles arrow Installing a PEAR Package
PEAR ARTICLES

Installing a PEAR Package
By: David Web
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-09-24

    Table of Contents:
  • Installing a PEAR Package
  • Using the installed Packages
  • mdb2 Package
  • Mail Package
  • More Mail!

  •  
     

    SEARCH CODEWALKERS

    Installing a PEAR Package


    (Page 1 of 5 )

    In the first article we looked at what PEAR is, how it works, how to install it and how to obey its coding standards. In this article we will look at how to install a package and, at the same time, we will create a content management system that has a database back end which uses one of PEAR's abstraction layers.

    Installing a Package

    The PEAR repository has many packages that are useful. In order to use these packages, you need to install them so that they can be accessed with PHP. Installing a package is very easy. We’ve already discussed three commands that are available in PEAR: install, uninstall and upgrade. They have the following syntax:

    pear install component_name – Lets you install a new package for use with PHP.


    pear uninstall component_name – Uninstalls a package from your PEAR installation.


    pear upgrade component_name – Upgrades and existing package.


    I have downloaded three packages, all available from the PEAR website:

    • mail-1.2.0a2.tar
    • db1.7.9.tgz
    • mdb2-2.5.0b1.tar

    We will install them one by one. To install the first package, open up the DOS prompt and type the following:

    pear install mail-1.2.0a2.tar

    Make sure that you type the package name exactly as it is, because if you don’t, the install will fail. When I run this line I get the following result:



    The above screen shows exactly what a successful install looks like. You should have the “Install OK” message for confirmation.

    We do the same with the remaining two packages. Here are the results:



    And the final package:



    More PEAR Articles Articles
    More By David Web

    blog comments powered by Disqus

    PEAR ARTICLES ARTICLES

    - Installing PEAR
    - PEAR: an Introduction
    - Managing robots.txt using PHP: Generating Dy...
    - Deleting Authors from a PEAR Content Managem...
    - PEAR CMS: Index and Delete Scripts
    - Listing Articles for a PEAR Content Manageme...
    - Building an Authors Page for a PEAR CMS
    - Building the View Details Page in a PEAR CMS
    - Creating the Main Pages of a PEAR CMS
    - Completing the Login Script for a PEAR CMS
    - User Authentication for a PEAR CMS
    - A PEAR CMS: Examining the Code
    - Building a Content Management System with PE...
    - Installing a PEAR Package
    - My PEAR: The Beginning

    Developer Shed Affiliates

     



    © 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap