How to installing PEAR on WAMP

In PHP, PEAR stands for PHP Extension and Application Repository. Recently i has been installed PEAR on WAMP(Windows Apache MySql PHP) machine in window 7. I am using two versions of PHP in my local wamp machine that is PHP5.2.9 and PHP5.3.10. I installed pear with PHP5.2.9, and also you can depends on you PHP version.

What have to do to install PEAR?

First of all you have to download file, and put this file into your PHP directory. I installed my wamp on “D:\” drive, and by default it is installing on “C:\” drive so please make sure about the location of your WAMP machine, and the go-pear.phar file should go like “D:\wamp\bin\php\php5.2.9\go-pear.phar”.

Now open your windows command prompt, as i told you before that i am using windows 7 then just hold the windows key and press “r” or you just direct click on the windows button and type cmd in your search bar that appear after click on windows button, then click on the “cmd.exe”. Now use window’s “cd” command to change the directory to the go-pear.phar, that looks like “D:\wamp\bin\php\php5.2.9” according to my example.

Now write the following command:

php -d phar.require_hash=0 go-pear.phar


and hit enter/return. After that you got a message like :

D:\wamp\bin\php\php5.2.9>php -d phar.require_hash=0 go-pear.phar

Are you installing a system-wide PEAR or a local copy?
(system|local) [system] :


Now select whether you like or not a local copy or a system one. If you want to install a local copy the type “system:local” and pressing enter. And by typing “system” and pressing enter you’ll install a system-wide copy, then type “yes” to confirm your action. In next shoot you get a list of directories, that PEAR will install it’s components. By typing “all” to install all that components, in my case i installed all these directories.

And at last your PEAR installation asking you to alter your “php.ini” file. By type “y” and press enter, then just restart your wamp and that’s it.