Install PEAR on Windows

“The PHP Extension and Application Repository (PEAR) is a repository of PHP software code.

To install PEAR you have to need to build first a webserver (WAMP). We will use de Apache sever with PHP and MYSQL for Windows 7.

System Requirements

  1. Apache 2.2
  2. PHP 5.2.17 or later 
  3. MYSQL-essential-5.1.58-win32 or later

Our experience shows that the installed software packages must match. Otherwise you will not get a working server.

Install

To install this software you have to go to pear page at Getting and installing the PEAR package manager and download to your computer. This should be stored at your computer where PHP is installed. Run  "php go-pear.phar".

Save go-pear.php to your C:/PHP drive and run php go-pear.phar:

  • C:\PHP>php go-pear.phar
    Are you installing a system-wide PEAR or a local copy?
    (system|local) [system] : local
    Please confirm local copy by typing 'yes' : yes
  • Open your php.ini and check of include_path de pear directory contains:
    include_path = ".;c:\php\pear"

Verifying command line tool

C:\PHP>pear
Commands:
build                  Build an Extension From C Source
bundle                 Unpacks a Pecl Package
channel-add            Add a Channel
channel-alias          Specify an alias to a channel name
.......

C:\PHP>pear version
PEAR Version: 1.9.4
PHP Version: 5.2.17
Zend Engine Version: 2.2.0
Running on: Windows NT WIN7 6.1 build 7601

Verifying the include path

C:\PHP>pear config-get php_dir
C:\PHP\pear

Don't forgot to restart your APACHE!

Last Check

<?php
require_once 'System.php';
var_dump(class_exists('System'));
?>

save as check_pear.php and go to localhost/check_pear.php:
you should see: bool(true)

thanks... PEAR MANUL

Pear Command List

This pear command list table is a copy of the PEAR officiaal website . Please go to this wsite for more details.


Command Description
1. build Build the extension from source
2. bundle Download and unpack a PECL extension
3. channel-add Add a Channel (PEAR 1.4+)
4. channel-alias Specify an alias to a channel name (PEAR 1.4+)
5. channel-delete Remove a channel from the list (PEAR 1.4+)
6. channel-discover Initialize a channel from its server name (PEAR 1.4+)
7. channel-info Retrieve information on a channel (PEAR 1.4+)
8. channel-update Update an existing channel (PEAR 1.4+)
9. clear-cache Clear the REST/XML-RPC cache
10. config-create Create a default configuration file (PEAR 1.4+)
11. config-get Echo a specific configuration setting
12. config-help Show information about a setting
13. config-set Set a specific configuration setting value
14. config-show Show all configuration setting values
15. convert Convert a package.xml 1.0 format to package.xml 2.0 format (PEAR 1.4+)
16. cvsdiff Execute and display a " cvs diff -u " on all files within the package
17. svntag Set a SVN release tag
18. download Download a package but not install it
19. download-all Downloads every available package
20. info Display information about a package
21. install Install a package, will report with success or failure
22. list List installed packages
23. list-all List all packages, packaged and/or available
24. list-channels List available channels (PEAR 1.4+)
25. list-files List files in an installed package (PEAR 1.4+)
26. list-upgrades List available upgrades for the installed packages
27. login Connects and authenticates to the remote PEAR server
28. logout Logs out from the remote PEAR server
29. makerpm Builds a RPM spec file from a PEAR package
30. package Build a package
31. package-dependencies Show package dependencies
32. package-validate Validate package consistency
33. remote-info Information about remote packages
34. remote-list List remote packages
35. run-scripts Run post-install scripts bundled with a package (PEAR 1.4+)
36. run-tests Run regression tests
37. search Search the remote package database
38. shell-test Do a shell script test
39. sign Sign a package distribution file
40. uninstall Uninstall and remove a package
41. update-channels Update the channel list (PEAR 1.4+)
42. upgrade Upgrade a package to the current version (see also: preferred_state)
43. upgrade-all Upgrade all packages (see also: list-upgrades)

Links