Saturday, April 30, 2011

How to install or uninstall pear packages in xampp for windows


Recently I had some tough time installing pear packages in xampp so I am sharing procedure here so that it can help you.

First of all go to folder c:\xampp\php and find the file pear.bat. In my case I installed xampp in c drive. If its not in c drive go to the correct path and find pear.bat file.

Open that file in Notepad or Notepad++ to edit. Find the following line in in that file.


Add following line above this line.


Now include c:\xampp\php to PATH environment variable.

In windows vista you can find it here.

Start->Control Panel->System and Maintenance->System->Advanced System Settings->Environment Variable

That's it and now go to command prompt and type command pear. You will see all the possible options for that command.

Use following command to install pear package.

pear install -o 'path of package'

Use following command to uninstall pear package.

pear uninstall 'pearname'

Generally name of pear is directory name inside php/pears folder.

Hope this post saves your time.