Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to uninstall PEAR from one installation of PHP and then install it with another existing PHP installation

Tags:

linux

php

pear

I have two installations of php on my server. One version of php is 5.2.0 configured with pear, and the other is 5.2.9 configured --without-pear. My server is running Red Hat Enterprise Linux AS release 4 (Nahant Update 9).

I would like to uninstall pear (and also PHPUnit) from php 5.2.0, and then reinstall it as part of the 5.2.9 version of php. The pear installation docs don't really cover this type of a situation, although they do tell Linux users to "consult the documentation for the respective distribution" in the event that they want to install pear with a version of php that was configured --without-pear. I am having trouble finding such documentation, and even if I did, I am not sure how to remove the existing pear installation first.

like image 786
fronzee Avatar asked Nov 29 '11 22:11

fronzee


People also ask

How do I know if PHP PEAR is installed?

Open the file in your browser as http://localhost/check_php.php , to verify the include_path your web server is using. In every case, PEAR's php_dir should be in the include path. If not, add it in your system's php.

Is PEAR installed in xampp?

Both MAMP and XAMPP come with the PEAR framework pre-configured, so installing the Mail package is simple.

What is the use of PEAR in PHP?

As noted previously, PEAR is short for "PHP Extension and Application Repository." The purpose of PEAR is to provide the following: A structured library of open-source code for PHP users. A system for code distribution and package maintenance. A standard style for code written in PHP.


1 Answers

Here is a partial answer to my own question: After trial and error, I discovered that you can uninstall pear by running this command:

$ sudo pear uninstall pear

I would like to see this added to the official pear docs, since they don't mention uninstalling pear at all.

like image 131
fronzee Avatar answered Oct 07 '22 00:10

fronzee