How to install PEAR with WAMP on windows

Published on Author Code Father
How to install PEAR with WAMP on windows. Install Pear on Windows 64x using WAMP.

You must have WAMP installed correctly first. 1We need to first locate the file go-pear.bat in our WAMP PHP install directory. In the current installation, this is located at C:\wamp\php\php5.3.13 although this will change based on your current version. In WAMP 64-bit versions sometimes this file is not included. Instead we can use the file go-pear.phar instead. Visit http://pear.php.net/go-pear.phar in your browser and save the page to a local go-pear.phar file.

 

2Put this file in the following directory: C:\wamp\bin\php\php5.1.13 (This directory may be different depending on your version of PHP.) 3Now, pull up the Windows start menu, type in CMD, then hit enter. We need to look at the folder we just put the .phar file in, so enter this string: cd C:\wamp\bin\php\php5.3.13 and hit enter. We should now be looking in this directory. PEAR CMD 4Next, we will need to run this .phar file by using the following command: php go-pear.phar 5It will ask “Are you installing a system-wide PEAR or local copy?” You will need to type “local” and hit enter. It will ask you to confirm by typing “yes” and hitting enter. Pear local 6You will be shown the 12 file locations corresponding to where PEAR will install packages, documents, config files and more. I just leave these on default in my WAMP PHP folder. Press enter to bypass this and accept this. 7You may receive the following error: This is letting you know your php.ini file doesn’t have the path that you just specified above in the CMD. If you type a simple “Y” and hit enter, the php.ini file will automatically be updated. Go ahead and do this if needed. 8You should be done with the CMD part now. If everything worked correctly, you should be notified that “The ‘pear’ command is now at your service…” 9Next, we need to add pear’s path to make sure that installing packages work. Go to Windows and type in System and hit enter. Click on Advanced System Settings on the left, then under the Advanced tab click Environment Variables. Edit the Path Variable and append the location to your PHP version folder in wamp: C:\wamp\bin\php\php5.3.13; Hit okay to save it. Be sure to include the semi-colon at the end of the folder path. 10Now open back up our CMD and type in pear followed by enter. If everything is working correctly, you should see pear’s list of commands.  

Comments

comments

One Response to How to install PEAR with WAMP on windows