Development

HowToInstallPearOnWindowsWithWamp

You must first sign up to be able to contribute.

Version 20 (modified by phpleo, 10 years ago)
--

How to install PEAR on windows with WAMP

Hello, in this turial I try to explain step by step like installing to PEAR and some of its Packages in Windows with WAMP.

1. Download and install the last version of Wamp Server. This it is to multiInstaller AMP (Apache, MySQL & PHP) that use, but I do not doubt that the results will be equal of satisfactory if you use another one, like for example XAMPP.

2. During the installation, I have left by defect the path's that to us the installer proposes, as they are: All the AMP: "C:\wamp", PathRoot?: "C:\wamp\www". Although for the tutorial these path's will be of importance, you can choose the path's to your convenience.

3. Enters to "C:\wamp\php", soon looks for and executes the file "go-pear.bat".

4. The window of Lines of Commands will be opened with the following message, immediately afterwards we pressed Enter:

5. After this, it will appear to us a list numbered until the 10. Here simply we return to press Enter.

6. Finished executing it will ask to us if we want that php.ini is modified, writes the letter "Y" (of yes, in capital letters and without comiles) and presses again Enter.

7. If you wonder yourself where this modification became, it walks until at the end of the file "php.ini" located in "C:\wamp\php" (the same path is shown in the line of commands) and observes the change:

;***** Added by go-pear
include_path=".;C:\wamp\php\pear"
;*****

8. Next it will be said to you that include_path will be updated, single press Enter.

9. And up to here the line of command arrived, (at the moment). As last message announces to us that a called file PEAR_ENV.reg has been created, which will add some windows environmet variables.

10. It enters to "C:\wamp\php" and it gives double click to the file "PEAR_ENV.reg". To the message that appears it gives in "Yes" and to the following one it gives "Accept".

11. In he himself directory, it copies the file pear.bat and paste in the directory "C:\WINDOWS\system32".

12. Now it activates the "Window Execute" and it writes "cmd" to open the line of command.

13. Once in pront it write pear so that commands appears to you all them who contains. If an error happened you will have to review the previous steps in case I do not go anything to you.

14. In this step it tries to install a package of PEAR like for example the one of MDB2.

15. Oops, a "fatal error" would have to appear. What happens is that in php.ini the limit of memory assigned for ours scripts PHP is of 8MB.

16. In order to avoid this error in the facilities to PEAR and future occasions, we will have changes to the size of memory assigned in 2 archives php.ini, to for example 64MB. These archives are in: "C:\wamp\php\php.ini" and "C:\wamp\Apache2\bin\php.ini".

17. Now it reinitiates the services/processes through WAMP.

18. It returns to try to install to PEAR MDB2 like in step 14, in this safe occasion that one will settle successfully.

19. In order to finalize it writes to pear list, to list all the packages installed of pear, in the sides that already appear listing MDB2.

As you can see this is a way to install to PEAR (although is the unique one that I know).

A last recommendation, whenever you update to pear or some of their packages copy pear.bat in system32 again, therefore we made sure to have also updates our line of commands to PEAR.

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

Much luck and greetings

Contacts

* Pedro Hernández (phpleo [at] gmail [dot] com ), http://blog.phpleo.com/

Attachments