PHP Hints

August 26, 2008

Installing PEAR on WAMP

Filed under: PEAR — Tags: , , , , , , , — kkruecke @ 1:02 pm

UPDATED June 28th, 2011

See PEAR on XAMPP for instructions on how to install pear for use with XAMPP.

Although a PEAR subdirectory is created during WAMP installation, PEAR is not included with the Wampserver. To install PEAR open a command prompt window (Start->Run->cmd. Then Enter). Go to the php executables subdirectory and run php -d phar.require_hash=0 PEAR/go-pear.phar:

C:\wamp\bin\php\php5.3.0>php -d phar.require_hash=0 PEAR/go-pear.phar

Reply to “Are you installing a system-wide PEAR or a local copy?” with “local”. When prompted, set each directory to the following scheme (note: the php version may differ):

1. Installation base ($prefix) : C:\wamp\bin\php\php5.3.0
2. Temporary directory for processing : C:\wamp\bin\php\php5.3.0\tmp
3. Temporary directory for downloads : C:\wamp\bin\php\php5.3.0\tmp
4. Binaries directory : C:\wamp\bin\php\php5.3.0
5. PHP code directory ($php_dir) : C:\wamp\bin\php\php5.3.0\pear
6. Documentation directory : C:\wamp\bin\php\php5.3.0\pear\docs
7. Data directory : C:\wamp\bin\php\php5.3.0\pear\data
8. User-modifiable configuration files directory : C:\wamp\bin\php\php5.3.0\pear\cfg
9. Public Web Files directory : C:\wamp\www
10. Tests directory : C:\wamp\bin\php\php5.3.0\pear\tests
11. Name of configuration file : C:\wamp\bin\php\php5.3.0\pear.ini
12. Path to CLI php.exe : C:\wamp\bin\php\php5.3.0\.

Although the installation will attempt to change php.ini (it will prompt you first) so that include_path points to PEAR, it uses c:\wamp\bin\php\php5.3.0\php.ini rather than C:\wamp\bin\apache\apache2.2.11\bin\php.ini. So after php -d phar.require_hash=0 go-pear.phar concludes be sure C:\wamp\bin\apache\apache2.2.11\bin\php.ini has this line (your version numbers may differ).

You may also need to check that include_path in “c:\wamp\bin\php\php5.3.0\php.ini” also has include_path=".;c:\wamp\bin\php\php5.3.0\pear", as I believe the command line version of php.exe may use this php.ini. It won’t hurt.

Restart Apache to reload the new php.ini and run phpinfo to verify the include_path.

Change the Windows PATH environment variable to include c:\wamp\bin\php\php5.3.0 (in Windows Vista: Start->Control Panel->System and Maintenance->System->Advanced System Settings->Environment Variable. Edit the PATH system variable and add c:\wamp\bin\php\php5.3.0). Now start a Windows command prompt and type pear. It will list all the pear commands. pear list will list all PEAR packages current installed. Use pear install -o <package> to install a package ( -o will install required dependencies).

You may need to add the following environment variables to the environment.


Go to a command line prompt and type SET, to check the settings for the enviroment variables above.

A brief overview of the pear command line tool commands:

  • pear — This list all the PEAR commands.
  • pear help — This will tell you what the command does.
  • pear config-show — This shows your pear configuration.
  • pear list — This will show you the PEAR packages currently installed.
  • pear list -a — This will show you the PEAR packages currently installed in all channels.
  • pear channel-discover — This will initialize a new channel, so you can install packages from it
  • pear search — This will search for a PEAR package.
  • pear uninstall — This will uninstall a PEAR package.
  • pear uninstall — This will uninstall a PEAR package.
  • pear upgrade — This will upgrade all packages currently installed.
  • pear upgrade — This will upgrade all packages currently installed.

This example shows how to install the Doctrine 2 ORM using the pear command line tool:

pear channel-discover
pear install

After a package is installed, the documentation for the package will be in a newly created folder under C:\wamp\bin\php\php5.3.0\PEAR\docs\.
The C:\wamp\bin\php\php5.3.0\PEAR\test\ folder typically contains a sample test php script, to test the package.

Some packages are in beta. To install them you first need to set the preferred release to beta:

pear config-set preferred_state beta. Then after installing the beta package do pear config-set preferred_state stable.

PEAR_Frontend_Web package, which was in Beta when this was written, is a web-based front-end alternative to the command line PEAR package manager. To install it open a Windows command prompt and do:

c:\wamp\bin\php\php5.3.0>pear install PEAR_Frontend_Web

About these ads


  1. Came across this article and it’s handy, thanks. Just one thing, I am behind a proxy that requires a login and password so if anybody else has trouble installing packages make sure you set the http_proxy for pear by typing after the shell

    shell> pear config-set http_proxy http://user:pass@domain:port

    If you don’t have a username and password but still behind a firewall then just try

    shell> pear config-set http_proxy http://domain:port

    Comment by Bill H — September 26, 2008 @ 2:36 pm

  2. […] support PEAR. See this sister article for how to install […]

    Pingback by Wampserver php.ini settings for use with xdebug.dll, PEAR, and Silverstripe cms framework « PHP Hints — October 24, 2008 @ 12:44 pm

  3. I get this error :(
    cmd> Pear
    cmd> pear list
    are working fine and pear is configured.

    Fatal error: Class ‘Net_SMTP’ not found in C:\wamp\www\mail\Mail\smtp.php

    Comment by khalid — December 16, 2008 @ 3:40 am

    • To install a package (such as Net_SMTP) open a Command Prompt window and do:
      >pear install -o Net_SMTP
      See the article Sending authenticated email with attachments. It shows how to install the PEAR packages necessary for sending authenticated email.

      Comment by kkruecke — December 16, 2008 @ 10:42 am

  4. […] support PEAR. See this sister article for how to install […]

    Pingback by Wampserver php.ini settings for use with xdebug.dll, PEAR, and Silverstripe cms framework — January 18, 2009 @ 1:21 pm

  5. […] in this new enviroment. So I followed the directions to install pear on WAMP server from the php hints site and the Hiveminds […]

    Pingback by WAMP PEAR Migration « NIM ReFLEXtions — February 20, 2009 @ 12:49 pm

  6. Great and it is work perfectly . thank you

    Comment by Fathi — March 4, 2009 @ 7:49 pm

  7. Great article. Thank you.

    There were a few minor differences in my installation which I will add here to save time for future visitors:

    Wampserver 2.0

    After go-pear.bat concluded, I did not find php.ini in this folder: C:\wamp\bin\apache\apache2.2.11\php.ini instead I accessed php.ini from Wampserver itself. Click on Wampserver in the task tray. Move the cursor to PHP and all the PHP options will show. Click on php.ini then do a search (Control-F) to find include_path. Enter the new include_path. For my installation the include_path is: include_path=”.;c:\wamp\bin\php\php5.2.9-2\pear” .Save and close php.ini. Go back to Wampserver and stop all services. Start all services, and put online. Now open php.ini and search for include_path. The new include_path should be there. Just like your article says type “pear” in the command prompt. If all the pear commands are listed, then you did it correctly.

    The other thing that was slightly different was the location of the index.php.txt file for the PEAR_Frontend_Web package. In my installation it was located at C:\wamp\bin\php\php5.2.9-2\docs\PEAR_Frontend_Web\docs\index.php.txt

    Comment by Jon L — June 2, 2009 @ 12:35 pm

    • I think the right path would be:

      that’s the one that wampserver uses from the task tray.

      The guide should be corrected!!!

      Comment by mario — August 6, 2010 @ 7:40 am

      • You are exactly correct. Thanks for pointing out mistabke this out. The include_path used by the php service runing under apache is C:\wamp\bin\apache\apache2.2.11\bin\php.ini. Although the command line version of php does, I believe, use c:\wamp\php\php5.3.0\php.ini.

        Comment by kkruecke — August 6, 2010 @ 9:10 am

  8. Thanks for the tip in locating the php.ini with a more recent version of wampserver.
    You might also find helpful.

    Comment by kkruecke — June 2, 2009 @ 4:37 pm

  9. After installing everything in C:\wamp\bin\php\php5.2.8, I cannot find PEAR_Frontend_Web in my system:

    “To use the PEAR_Frontend_Web copy \PEAR\docs\PEAR_Frontend_Web\docs\index.php.txt to \wamp\www (or a subdirectroy thereof).”

    From command line ‘pear list’ does show it is installed, yet it isn’t in my directory. Ideas/Suggestions??

    Comment by Edward — June 17, 2009 @ 5:16 pm

    • I’ve switched from Windows to Ubuntu/Linux and use the command line. Check the documentation for the package. To find out the directory for the documentation do

      pear config-get doc_dir

      Comment by kkruecke — June 18, 2009 @ 4:54 pm

  10. Thanks for this write-up. I was able to install and configure PEAR on my Wampserver install and now it’s running! I then ran the command to install the HTML_Table package and it works fine. My code’s throwing a little error but the table lays out just fine. Just have to debug my code :)

    thanks again!

    Comment by mueni — July 15, 2009 @ 1:03 pm

    • Glad it was of help!

      Comment by kkruecke — July 23, 2009 @ 4:13 pm

  11. how to check where my packages are installed i cant seem to find them though the command pear-list shows that it has been installed

    Comment by atish — July 19, 2009 @ 11:19 am

    • I’m sorry, I didn’t notice your comment until today. Try doing
      >pear config-show
      and look for the “PEAR directory”. PEAR packages should be installed under it.

      Comment by kkruecke — July 23, 2009 @ 4:12 pm

  12. Hello friends,

    You can view step by step instruction with visual at following URL:

    Drop me comment there if you found any problem


    Comment by mitulmpatel — November 9, 2009 @ 1:23 am

  13. Mitulmpatel,

    I looked at, and I think step 7 is in error.
    There are two php.ini files in the WAMP subdirectories: c:\wamp\bin\php\php5.3.0\php.ini and C:\wamp\bin\apache\apache2.2.11\php.ini.

    If you are running WAMP, ‘go-pear’ will update c:\wamp\bin\php\php5.3.0\php.ini. This is the wrong one because WAMP uses C:\wamp\bin\apache\apache2.2.11\php.ini. So make sure


    is in both c:\wamp\bin\php\php5.3.0\php.ini and C:\wamp\bin\apache\apache2.2.11\php.ini.


    Comment by kkruecke — November 9, 2009 @ 11:31 am

  14. I get the following when running go-pear.bat:

    phar “C:\wamp\bin\php\php5.3.0\PEAR\go-pear.phar” does not have a signaturePHP W
    arning: require_once(phar://go-pear.phar/index.php): failed to open stream: pha
    r error: invalid url or non-existent phar “phar://go-pear.phar/index.php” in C:\
    wamp\bin\php\php5.3.0\PEAR\go-pear.phar on line 1236

    Comment by Gaurav — December 23, 2009 @ 11:57 pm

  15. Thanks for your comment. I downloaded Wampserver 2.0i and also got the same error. See for a solution.

    Comment by kkruecke — December 25, 2009 @ 5:29 pm

  16. Okay, I got all this working on my old XP box, but with my new Windows 7 computer I’m having more trouble. These errors don’t even make sense:

    C:\wamp\bin\php\php5.3.0>pear config-set preferred_state beta
    PEAR_Config::writeConfigFile fopen(‘C:\Windows\pear.ini’,’w’) failed (fopen(C:\W
    indows\pear.ini): failed to open stream: Permission denied)

    I reran go-pear.phar and double checked my pear.ini directory, but still get this message.

    I tried skipping the FrontEndWeb and went directly to the package I want, and this message is weird:

    C:\wamp\bin\php\php5.3.0>pear install -o –alldeps Mail
    download directory “C:\Users\Gaurav\AppData\Local\Temp\pear\download” is not wri
    teable. Change download_dir config variable to a writeable dir

    (Same text repeats four times)

    I created the requested subdirectory in my …\AppData\Local\Temp and made it world writeable, but that didn’t help.

    Comment by Gaurav — December 27, 2009 @ 10:52 pm

    • ok, I had the same problem on win7, fixed it by running cmd as Administrator, then running the go-pear script.

      Comment by Chris — March 19, 2010 @ 6:18 pm

  17. Is pear.ini located in c:\windows? If so, then you probably don’t have read permission.

    Comment by kkruecke — December 27, 2009 @ 10:58 pm

  18. No, there is no pear.ini in C:\windows. I can’t put it there either.

    Comment by Gaurav — December 27, 2009 @ 11:54 pm

  19. I don’t have Windows 7 installed. But I ran across this article titled “Installing PEAR, MDB2 for WAMP server in Windows 7, Vista, XP 32 & 64 bit”:

    Maybe it will help

    Comment by kkruecke — December 28, 2009 @ 12:06 am

  20. 9. Public Web Files directory : C:\wamp\www

    How to change the path??
    I cant get the command :( Someone please help. I tried “9 “C:\wamp\www”” I tried everything I could :S
    Please help me

    Comment by bellehelene — January 7, 2010 @ 7:47 am

    • Hi! Did you fixed it?

      Comment by J — February 11, 2010 @ 12:17 pm

      • After go-pear.bat finishess you must manually edit the php.ini file found in: C:\wamp\bin\apache\apache2.2.11\

        You must add the path to pear to the include_path line:


        Then you must restart apache2, or just shut down WAMP and restart it.

        Note: apache2.2.11 is probably not the current version of apache2 (that is included with WAMP), and the name of the subdirectory beneath \wamp\bin\php that contains php might be different, too.

        Comment by kkruecke — February 11, 2010 @ 2:14 pm

      • Did who fix what?

        Comment by kkruecke — February 11, 2010 @ 4:05 pm

  21. If anyone who installed wamp 2.0 had trouble (after doing the pear install from the command line_
    and can’t view the web front end, even after installing and using the appropriate paths desricbed in this blog, try this:
    1.) make a new .htaccess file and drop it in your “PEAR www files directory” which should be “C:\wamp\www”
    2.) place the following in that .htaccess file:

    php_value include_path “C:\full\path\to\installer\PEAR”
    php_value error_reporting 0

    SetEnv PHP_PEAR_BIN_DIR “C:\full\path\to\installer”
    SetEnv PHP_PEAR_DATA_DIR “C:\full\path\to\installer\PEAR\data”
    SetEnv PHP_PEAR_DOC_DIR “C:\full\path\to\installer\PEAR\docs”
    SetEnv PHP_PEAR_INSTALL_DIR “C:\full\path\to\installer\PEAR”
    SetEnv PHP_PEAR_SYSCONF_DIR “C:\full\path\to\installer”
    SetEnv PHP_PEAR_TEST_DIR “C:\full\path\to\installer\PEAR\tests”

    and you should be able to view your webfrontend as long as you got it from the install location (if you can’t find it search for “index.php.txt”) rename it to anything.php and place it in you www root or subdirectory and call it, should work.

    Comment by iPollesion — January 28, 2010 @ 11:42 pm

    • Thanks for your comment (hope you don’t mind that I reformatted it slightly).

      Comment by kkruecke — January 29, 2010 @ 12:27 am

  22. Thanks for posting this, it’s just what I needed to install PEAR. I have php 5.3.0 installed and so I had to follow this tutorial as well to get it to work:

    Comment by James Ehly — February 19, 2010 @ 12:35 am

  23. I’m afraid it just doesn’t work.

    I’ve just done a clean install of XP, and downloaded Wamp latest version with PHP version 5.3.0

    It leaves option 12 blank, and doesn’t specify how to specify the folder (bad design).

    I attempt to type “12 c:\wamp\bin\php\php5.3.0″ minus quotes. It says something like “not a folder or can’t find php.exe in this folder” (which is a lame error message)… it could at least say something like “not a folder… the correct syntax to specify a folder is…” or “Could not find php.exe in specified folder”. Why is it that people are such bad designers these days… totally lame… sorry but maybe my standards are high or I actually design things properly! Not having a go at your article but the crappy software go-pear. So lame!

    Also for wamp to have a Pear folder is misleading as it doesn’t install Pear… this is also really bad design.

    I’ll just install Pear by hand… at least it might work… sheeeesh!

    Comment by Mike — April 20, 2010 @ 8:28 pm

  24. OK so here’s the fix from memory:

    1) Go to this URL:
    2) Click ‘save as…’ and save it wherever your php.exe is.
    3) Type “php go-pear” minus quotes.
    4) Update ‘include_path’ in both php.ini files in wamp to the appropriate pear path (for me it was C:\wamp\bin\php\php5.3.0\pear)

    This worked for me! Just ignore the horrendous deprecation warnings for this go-pear (yet again lame effort! Quality code doesn’t have warnings!).

    Comment by Mike — April 20, 2010 @ 8:52 pm

  25. Hi,

    Ive got as far as intalling PEAR_Frontend_Web program. I ran the file under my localhost root www folder, it ran OK but threw a ton of error messages like the ones below – what did I do wrong? Also a guide of how to install extensions without using the webfrontend would be useful.


    Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\bin\php\php5.3.0\PEAR\PEAR\Config.php on line 650

    Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\bin\php\php5.3.0\PEAR\PEAR\Config.php on line 697

    Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\bin\php\php5.3.0\PEAR\PEAR\Config.php on line 757

    Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\bin\php\php5.3.0\PEAR\PEAR\Config.php on line 786

    Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\bin\php\php5.3.0\PEAR\PEAR\Config.php on line 914

    Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\bin\php\php5.3.0\PEAR\PEAR\Config.php on line 1577

    Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\bin\php\php5.3.0\PEAR\PEAR\Config.php on line 1607

    Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\bin\php\php5.3.0\PEAR\PEAR\Config.php on line 2034

    Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\bin\php\php5.3.0\PEAR\PEAR\Config.php on line 2087

    Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\bin\php\php5.3.0\PEAR\PEAR\Registry.php on line 322

    Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\bin\php\php5.3.0\PEAR\PEAR\Registry.php on line 1425

    Comment by John Aspinall — May 19, 2010 @ 9:53 am

  26. thanks for your comment. I added a synopsis of PEAR command line commands. The PEAR_Frontend_Web is no longer in Beta. I suggest you uninstalled it, then reinstall it following the new instructions: simply by doing “pear install PEAR_Frontend_Web. Since I don’t use it myself, preferring the command line, you might check with the developers of the package. There may be other web front ends in the pear library, too.

    Comment by kkruecke — May 19, 2010 @ 10:39 am

  27. pear install for thanx..

    Comment by chip — July 25, 2010 @ 1:18 am

  28. What is the syntax for changing a single configuration option? Whatever I try:
    6 C:\wamp\bin\php\php5.3.0\pear\docs

    I get this message:
    6. Documentation directory : Input Error: There is no file extension in “C:\Documents”.

    The “all” option works, and helpfully supplies the default values so you don’t need to enter them again.

    Thanks for a thorough and clear article,

    Comment by Eric Lee — August 1, 2010 @ 8:13 pm

  29. Simply enter the number 6. We will get “Browse for File or Folders” dialog box. Navigate to the directory you want to use. If it doesn’t exist, click “Make New Directory”.

    Comment by kkruecke — August 2, 2010 @ 12:17 pm

  30. Brilliant article. Installed PEAR All went fine. Other things went ‘pear-shaped’ and reinstalled everything. Tried to find this site again, couldn’t. Then once again out of the blue here it is!

    Comment by Neil Buchan — August 19, 2010 @ 4:26 pm

  31. I’m glad it helped.

    Comment by kkruecke — August 19, 2010 @ 9:13 pm

  32. Thanks for this wonderful tutorial, after all this year, it still very informative, God bless you richly. Amen

    Comment by Anthony Fuludu — August 29, 2010 @ 12:26 pm

  33. Thanks! This was so helpful!

    Comment by melissakate — September 21, 2010 @ 10:35 pm

  34. Many Thanks! the most useful page i found…

    Comment by Harish Krishnamurthy — September 27, 2010 @ 12:42 pm

  35. Thanks a lot.
    It was most helpful.

    Keep your good works going on.

    Comment by Janakiraman — October 14, 2010 @ 6:35 am

  36. Really prefect and brilliant article. I spent almost half day finding articles on installing PEAR on WAMP. I did not find even a single article which could resolve my problem. The writer has done really a great job.

    Comment by Ahmad Rasheed — November 9, 2010 @ 10:52 am

  37. Thank you very much! :)
    Very useful!

    Comment by carnitos — November 14, 2010 @ 10:40 pm

  38. Thanks a lot for this helpful guide! :)

    Comment by Bas — November 15, 2010 @ 3:31 am

  39. Very useful!

    Comment by mohamad — December 2, 2010 @ 2:14 am

  40. Thank you so much !!!
    Wonderful article


    Comment by Guby — December 4, 2010 @ 11:23 am

  41. Works like a charm! Thanks for the instructions!

    Comment by Johnny — December 30, 2010 @ 3:27 pm

  42. Waoh, thanks very much, very detailed and easy-to-follow instructions. Worked perfectly!

    Comment by Fatimah — January 2, 2011 @ 4:32 am

  43. Very good article. I followed the instructions and it worked very well for me. Continue the good work ::)

    Comment by Nick — January 22, 2011 @ 11:05 am

  44. FREAKING AWESOME… very good guide… thanks a ton.

    Comment by Jonathan — January 23, 2011 @ 1:35 am

  45. Very helpful.
    Thanks for saving valuable time.

    Comment by Dinesh Maurya — February 26, 2011 @ 3:47 pm

    • Glad it helped you. Thanks for your comment.

      Comment by kkruecke — February 26, 2011 @ 6:32 pm

  46. […] to configure PHPUnit on my Wamp install, I ran into nothing but headaches, even after following the numerous tutorials I found […]

    Pingback by without the 'a' » Configuring PHPUnit on Wamp 2.x — March 27, 2011 @ 1:48 pm

  47. I have an installation of WAMP which includes php4.4.8 and php5.3.4 and there is a go-pear.bat file only in the 4.4.8 directory. When I run go-pear.bat I end up with “PEAR_Remote ( : unexpected HTTP response” which WireShark tells me is a 410 error. It seems that some artifacts have moved?

    Comment by Peter O'Leary — June 22, 2011 @ 9:58 am

    • I suggest Installing XAMPP instead of WAMP becaue it comes with PEAR already installed. If I remember you, then, simply need to go to the XAMPP php subdirectory and run the pear command from the command line. To download XAMPP: .

      Comment by kkruecke — June 22, 2011 @ 10:48 am

  48. I get this error everytime when i try to installing doctrine in windows using the pear channel

    pear channel-discover
    Discovering channel over http:// failed with message:
    channel-add: Cannot open “” (Connect
    ion to `′ failed: A connection attempt failed becaus
    e the connected party did not properly respond after a period of time, or establ
    ished connection failed because connected host has failed to respond.)

    I am able to do the same successfully in linux..

    My pear installation went fine in windows but i am not able to install any packages. :(

    Comment by Ratzzak — June 27, 2011 @ 8:51 am

  49. This is what I did to install Doctrine 2 installed on Windows 7. I used XAMPP instead of WAMP.

    1. I downloaded the 7z’ipped version,, and unzipped it to c:\xampp.

    2. I installed the cygwin — — linux command line utilties for windows.

    3. I ran the cygwin “as Administrator” (right click the Cygwin desktop icon and select “run as administrator”).

    4. I changed the permissions of the c:\xampp directory to 777

    #cd /cygdrive/c

    # chmod -R 777 xampp

    5. Set the PEAR configuration settings for data_dir, test_dir and doc_dir. For example,

    # cd /cygdrive/c/xampp/php
    # mkdir pear/data
    # ./pear.bat config-set data_dir c:\\xampp\\php\\pear\\data

    I did this for data_dir, test_dir, doc_dir, etc. You will need to create the respective directories first as shown. Note the use of double slashes! Also note: You may need to do the chmod -R 777 again after the config-sets, to make the subdirectories read/write-able.

    6. Then, finally, do

    # ./pear.bat channel-discover
    # ./pear.bat install

    This worked for me.

    Comment by kkruecke — June 28, 2011 @ 5:02 pm

  50. After this line

    C:\wamp\bin\php\php5.3.0>php -d phar.require_hash=0 PEAR/go-pear.phar

    When I setup the line as given , it will give fatal error.

    So please more modify him, because it is not working and difficult to understand.


    Comment by rizwan kk — July 4, 2011 @ 6:38 am

  51. Thanks for this post. Has greatly helped me. Just finished installing pear. And I sure am bookmarking this article. Great post

    Comment by kwabs — July 10, 2011 @ 5:27 am

  52. Thank u… This information was very useful…..

    Comment by Vishnu Pradeep — July 13, 2011 @ 1:16 am

  53. Hi Kurt! Very useful article, you have helped many people! For example, I use UwAmp and I could not install PEAR (correctly) and extension PhpDocumentor ((endless attempts a week)). This extension is necessary to work in conjunction with the IDE NetBeans. If my request does not take much of your time, could you explain it to your blog. Thank you!

    Comment by wikicms — August 4, 2011 @ 2:18 am

  54. Why don’t you simply install WAMP, then install SQLLITE separately. I bascially use Ubuntu 100% of the time now. If your problem is related to Netbeans, you could ask on their support forums.

    Comment by kkruecke — August 4, 2011 @ 8:51 am

  55. Thanks! Works just fine!

    Comment by What! — September 22, 2011 @ 11:42 pm

  56. Thank you so much !
    2 days that i’ve been trying to install it :/

    Comment by AmelLaawini (@AmelLaawini) — October 19, 2011 @ 8:41 am

  57. hmm, I just installed wamp 2.2 and there is no PEAR directory anywhere and, of course, no PEAR/go-pear.phar. So the command “php -d phar.require_hash=0 PEAR/go-pear.phar” fails.

    Comment by franta — October 29, 2011 @ 4:36 am

  58. […] rights otherwise some error could occure when installing PEAR. Now follow steps mentioned on PHP Hints WordPress blog to install and configure PEAR on […]

    Pingback by Send email from localhost/WAMP server using PEAR Mail and GMail |'s Technology Blog — May 9, 2012 @ 9:18 am

  59. […] ao pai dos burros, ele me informou um link para o blog phphints onde existe este comando milagroso: Shell > cd C:wampbinphpphp5.3.0 > php -d […]

    Pingback by Instalando PEAR no WAMP sobre o windows 7 | Adler Parnas — May 20, 2012 @ 12:07 pm

  60. I tried lots of other stuffs but only this worked for me, I am very thankful to you for sharing this, i also found your other article for sending the emails from localhost which solved my months old issue. Now I can do all my tests on localhost.
    Thanks alot and keep it up.

    Comment by Malik Tahir — June 13, 2012 @ 1:46 am

  61. Great article. With a wamp installation, go to and download the go-pear.phar. Go to your wamp/bin/php/phpx.x.x directory and create a new folder. Name the new folder PEAR, drop the go-pear.phar in there and execute the command C:\wamp\bin\php\php5.3.0>php -d phar.require_hash=0 PEAR/go-pear.phar . That should get you going.

    Comment by Casper Wilkes — August 18, 2012 @ 9:52 am

  62. Instead of manual installation can Pyrus be used for installation of PEAR packages on WAMP 2.2.

    Comment by Ashish Anand — August 20, 2012 @ 8:44 am

    • I’m not familiar with pyrus.

      Comment by kkruecke — August 20, 2012 @ 9:43 am

  63. U told to set the Environment Variable in this way;


    But i saw docs,data & test folder are not present within the php5.3.3[my version]\PEAR
    But it exists in php5.3.3 folder, so should i change the path accordingly, would it cause any type of problem in running code??

    One more thing where should i put my project folder , should i use > C:\wamp\www or C:\wamp\bin\php\php5.3.3\www

    Please reply, & Thank you for explaining the whole process in such a simple way..

    Comment by Dibyendu — August 30, 2012 @ 10:03 am

    • You, of course, want to specify the current version of php, php5.3.3 and not php5.3.0, the version that is bundled with wampserver.

      You only need to be sure that your php.ini has include_path set to also include the path to pear. I would not worry about docs, data and test.

      I’m not sure what you mean by your “project folder”? Put your websites under c:\wamp\www. I hope that helps.

      Comment by kkruecke — August 30, 2012 @ 10:25 am

      • In my php.ini there is this line:

        ;***** Added by go-pear

        Still an error showing

        Warning: require_once(Mail.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\PEARMail\gmail.php on line 3

        Fatal error: require_once() [function.require]: Failed opening required ‘Mail.php’ (include_path=’.;C:\php5\pear’) in C:\wamp\www\PEARMail\gmail.php on line 3

        Comment by Dibyendu — August 30, 2012 @ 10:38 am

  64. if it’s not working try to clear the cache and you temp files

    Comment by bleuscyther — November 25, 2012 @ 1:22 am

  65. […] new to PEAR framework of PHP. I just installed everything fine using steps from this tutorial page. But a while ago when I attempted to change installation state from stable to beta […]

    Pingback by PEAR: Preferred state not changingQueryBy | QueryBy, ejjuit, query, query by,, android doubt, ios question, sql query, sqlite query, nodejsquery, dns query, update query, insert query, kony, mobilesecurity, postquery,, sapquery, — October 18, 2013 @ 12:20 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Shocking Blue Green Theme. Blog at


Get every new post delivered to your Inbox.

%d bloggers like this: