This blog is about C++, CakePHP, Linux, PEAR, PHP, Pyrus, Apache, and MySQL and related topics.

Friday, October 23, 2009

How To Install PEAR With WampServer 2.0i

My last post described how to install PEAR with PHP 5.3.0 on a Windows XP machine.

Here, I will describe how I was able to get PEAR running with WampServer 2.0i

I like WampServer because it is the easiest way to install PHP, MySQL, and Apache on a Windows machine. Just go to the WampServer site, download and install the file. That's it.

Once it is installed if you want to add PEAR. This is what to do:

Note: I used the default folders when installing WampServer so if you want to follow me exactly then use the default folders. Otherwise, make note of your folders and make the necessary adjustments.

1. Go to this page and copy the content and create a file called go-pear.php. Save this file in the following directory: c:\wamp\bin\php\php5.3.0

2. Open the command line. Switch to the php directory (the one that has php.exe in it).

cd c:\wamp\bin\php\php5.3.0

3. Type this command:

pear.php go-pear.php

4. Answer the installation questions. You might see a lot of warnings concerning deprecated methods. This is normal.

5. Update php.ini. This is the key to getting this right. There are two php.ini files. They are:


The phpinfo() page says the loaded configuration file is C:\wamp\bin\apache\Apache2.2.11\bin\php.ini but change I made to c:\wamp\bin\php\php5.3.0\php.ini were reflected on this page. Instead of figuring out which to use I decided to update both.

Do this to both php.ini files:

Open the php.ini file in any text editor. Notepad will do. In the "Paths and Directories" section find this line:;

Windows: "\path1;\path2"

Change the next line to the following:

include_path = ".;c:\wamp\bin\php\php5.3.0\pear"

Be certain to remove the ';' at the beginning of the line if one is present.

Save and close file.

Now it's time to verify if PEAR is properly installed. <--This article will show you how to do that.

1 comment:

  1. Shouldn't

    pear.php go-pear.php


    php.exe go-pear.php???