You must first sign up to be able to contribute.

Version 21 (modified by pipdarude, 10 years ago)

How to install PEAR on windows with WAMP

Hello, in this tutorial I will explain step by step how to install PEAR and some of its packages in Windows with WAMP.

1. Download and install the latest version of the WAMP Server. This is the Windows AMP (Apache, MySQL & PHP) package that I use, but I do not doubt that the results will be equally satisfactory if you use another one, like XAMPP for example.

2. During the installation, I used the default paths proposed the installer: "C:\wamp", "C:\wamp\www", etc. Although these paths will be referenced in this tutorial, feel free to alter the paths to your needs.

3. Enter "C:\wamp\php", and locate and execute the file "go-pear.bat".

4. A command prompt window will be opened with the following message; press Enter to proceed.

5. Afterward, a list of up to 10 (this length may differ on XAMPP and others) filesystem locations will be displayed. Once again press Enter.

6. Then it will ask if we want to modify php.ini; Type in the letter "Y" (in capital letters) and press Enter.

7. To view this modification check the end of the "php.ini" (located in "C:\wamp\php") and you should see:

;***** Added by go-pear

8. Next you will be notified that the include_path was updated. Press Enter to continue.

9. A final message announces that a file called PEAR_ENV.reg has been created, which, upon execution, will add some Windows environment variables.

10. Enter "C:\wamp\php" and double click the file called "PEAR_ENV.reg". When asked to confirm the addition of registry values choose "Yes" and then click "OK".

11. In "C:\wamp\php", copy the file pear.bat to "C:\WINDOWS\system32". Alternatively you can add "C:\wamp\php" to your windows PATH environment variable to expose this file globally.

12. Next open the run dialog and type "cmd" to open a command prompt window.

13. Type pear to see all available commands and verify proper installation. If this command is unrecognized you will have to review the previous steps and repeat anything you missed.

14. Next update the memory_limit property value to 64M in php.ini. This will help php script execution. This file is found in "C:\wamp\php\php.ini" and "C:\wamp\Apache2\bin\php.ini"; update both.

15. Now reinitiate the services/processes through WAMP.

Finally, whenever you update PEAR or some of its packages, copy pear.bat into system32 to update our list of PEAR commands. This extra step can be avoided if the path to pear.bat has been added to your PATH environment variable.

The continuation of this tutorial is: How to install Symfony on windows with WAMP

Much luck and greetings


* Pedro Hernández (phpleo [at] gmail [dot] com ),