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.