Pages

Wednesday 16 November 2011

Installing PEAR on Windows

This really is just a short quick guide on how to install PEAR manually on a Windows box.  There are currently multiple ways of setting PEAR up, and I'm going to show you my preferred way, only because it's easy to fault find in case anything goes wrong.

For those who don't know what PEAR is, PEAR is essentially a customisable framework of many components that you can choose to have on your system.  It really takes aim at giving access to functionality that doesn't exist with the standard PHP functions.

First thing first, you will need to have a working copy of PHP installed and working on your system (preferably the latest version), and that is really about it.  You should notice that you already have a PEAR folder in the root of your PHP folder anyway, and so this ready and waiting for you to activate the features.

To do so, open a Command Prompt (go to Start > Run > type 'cmd' and press enter) and navigate to your PHP folder.  Once you've made it there, the command prompt on the left should be showing that you are in the root of your PHP folder.  If not, you are in the wrong place.  It should look something like it does here on the left.

Next, type 'go-pear' and hit return.  You will be asked if you would like to install a system or a local copy, so you will need to type 'system' here.  Once you have done this, you will be presented with 11 options that specify locations of your files and folders.  Normally this is correct straight out of the box, but if you like many people move your PHP folders then you will need to update these locations.  When you are ready, hit enter again, and off it goes.

The next screen will show PEAR installing and when it's ready there will be a small paragraph at the bottom asking you to execute a reg file that has been placed in the root of your PHP folder called 'PEAR_ENV.reg'.  Don't worry, this is completely harmless as this just lets Windows know that PEAR is up and running on your system.

And, well, that's it really.  You've set PEAR up on your system and are nearly ready to go!  All you need now are some packages that are freely available from the PEAR website.

No comments:

Post a Comment