Click to See Complete Forum and Search --> : Installing or turning on PEAR


mpar612
04-30-2007, 10:29 AM
Hello, I'm new to Linux, setting up and running webservers. I purchased an unmanaged server that came with a lamp configuration and Plesk installed. I am trying to get PEAR functioning. I put a php_info() page up and in the "Configure Command" section there is a long list of things and "--without-pear" is listed. I know this should probably say "--with-pear". How do I enable it?

I believe my first step would be to download the "PEAR Package Manager" by using the following command:

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

Does this also install the "standard" packages (e.g. DB, Mail, etc...)?

I understand this might be basic and I have not tried this approach. I am very new to this and just want to make sure that I don't screw anything up before I do anything.

Thanks in advance!

sneakyimp
05-07-2007, 04:18 PM
depending on your linux version, there may be a package manager. mine is Debian Linux, for instance. This command can be used to install or uninstall pear:

apt-get install pear

or something like that anyway.

i have also used the php script from pear.org but I did it a little differently. The effect is basically the same but I used a browser I downloaded the php source of that file and pasted it into a php file on my machine. I then visited the page in a web browser. I seem to recall I was able to choose from a variety of options.

Pear is pretty straightforward...a proper installation will put all the pear source files where they can easily be found by using the right include path. As you may or may not know, doing this will cause php to look in several different places for a folder called 'path' containing a file named 'file.php':
include('path/file.php');

if pear is installed properly, it will end up in one of the places that php naturally looks for included files.

Kudose
05-07-2007, 06:52 PM
For Fedora, use

yum install pear