SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Installing PEAR Packages

    Hi everyone,

    If you were involved in my last messy PEAR thread then you'll probably understand how little I know about it. I'm trying to install PEAR packages onto both my local apache/php webserver and also my online webservers.

    I've found that I'm confusing myself, I've downloaded the latest release of PEAR and read the INSTALL file which tells me to use the install.msi for my windows machine. There isn't one. It's just a package of PHP files but not all of the ones I need such as the HTML/TABLE/MATRIX packages.

    So I've been onto the PEAR site and downloaded these individually but there's no structure to them. For instance the HTML_TABLE package comes in folders TABLE, DOCS and TEST. Where do I put these, I can only assume within the PEAR folder in PHP. I then need some other dependant packages and these come in similar folders but require each and say "Can't find HTML/TABLE" so I moved them all into an HTML folder. Then I do the same for another package which requires them in a HTML/TABLE/MATRIX/FILLER folder but they appear to be the same PHP files so I've ended up duplicating them.

    Is there any easy way to download and install Pear packages?

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Pear will expect that the path to the top level PEAR directory will be amongst your include_path directive in your ini file, eg

    include_path = ".;\var\www\includes;\var\www\includes\PEAR;"

    OR you will have to tell each script where to find PEAR,

    ini_set("include_path" , "/var/www/includes/PEAR");

    OR you will have to set the directive in a .htaccess file somewhere.

    Either way, the packages should start working as long as you have a folder set up like:

    /var/www/includes/PEAR

    Which must contain:
    Pear.php

    Then containing for example:

    /HTTP
    /Net
    ... your packages here



    HTH


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •