PEAR Articles

  Home arrow PEAR Articles arrow Page 2 - My PEAR: The Beginning
PEAR ARTICLES

My PEAR: The Beginning
By: David Web
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2008-09-17

    Table of Contents:
  • My PEAR: The Beginning
  • Installing PEAR
  • PEAR Coding Standards
  • Functions

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    advertisement

    My PEAR: The Beginning - Installing PEAR


    (Page 2 of 4 )

    Installing PEAR is very easy. I find that it is a bit more complicated to find a particular package for a project than to actually install PEAR. The first place to look when searching for a package is the PEAR home page at  http://pear.php.net/

    The PEAR package manager is bundled with all modern versions of PHP. Linux and Unix users do not explicitly have to install Package Manager as it is automatically installed. Windows users, however, have to go through the following steps (this guide assumes that you have installed php in c:php):

    • At the command prompt run the following:

      C:cd phppear

    • Once you are into the above directory, type:

      C:phppear>..php go-pear.php

    the following welcome message should then appear on the screen:

    Welcome to go-pear

    After the welcome screen, simply follow the instructions and all the currently available packages will be downloaded and installed.

    Now you are ready to use the Package Manager. The Package Manager is usually run from the command prompt or command shell. Provided you are the administrator or root, you should not have any problems operating the Package Manager. It has a lot of commands:

    • Install
    • Uninstall
    • Channel-add
    • Channel-alias
    • Channel-info
    • Channel-delete
    • Channel-update
    • List
    • List-all
    • Login
    • Logout
    • Makerpm
    • Package
    • Package-dependencies

    and so forth. 

    There are many more commands that you can use with Package Manager. The ones that we are interested in at this stage are install, uninstall and upgrade. Here's the syntax:

    pear install component_name


    pear uninstall component_name


    pear upgrade component_name


    Ensure that you enter the component name as it is; in other words, make sure to keep any capitalization, spacing and underscores intact. If everything went okay, you should get an "install ok" response. This means that the package has been installed successfully.

    A common error message that you will often encounter when installing packages will say something about a package having been deprecated. Don't worry about it. Some packages were written for PHP 4 and sometimes these packages contain syntax that PHP 5 just does not understand, so just ignore them.

    Later on we will install and test packages.

    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


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