PEAR is short for “PHP Extension and Application Repository” and is pronounced just like the fruit. The purpose of PEAR is to provide:
PEAR’s mission is to provide reusable components, lead innovation in PHP, provide best practices for PHP development and educate developers.
The code in PEAR is partitioned in “packages”. Each package is a separate project with its own development team, version number, release cycle, documentation and a defined relation to other packages (including dependencies). Packages are distributed as gzipped tar files with a description file inside, and installed on your local system using the PEAR installer.
This command helps to determine the usage of PEAR module. The user will come to know about the different way/format to execute this module. This command guides the end user to know the purpose of this command. Below given are the command and the screenshot of the same.
ptconfigure pear help
The pictorial representation of the above command is listed below,
kevell@corp:/# ptconfigure pear help
******************************
This command allows you to modify create or modify pears
Pear, pear
- install
Install
example: ptconfigure pear pkg-install --package-name="somename"
- remove
Remove
example: ptconfigure pear pkg-remove --package-name="somename"
- ensure
Ensure
example: ptconfigure pear pkg-ensure --package-name="somename"
------------------------------
End Help
When the user need to install a pear, the below given command will execute the process.
ptconfigure pear pkg-install --package-name="somename"
kevell@corp:/# ptconfigure pear pkg-install --package-name="file"
downloading File-1.4.1.tgz ...
Starting to download File-1.4.1.tgz (8,164 bytes)
.....done: 8,164 bytes
install ok: channel://pear.php.net/File-1.4.1
******************************
Pear Modifications:
--------------------------------------------
Pear: Success
------------------------------
Pear Mods Finished
******************************
When the user needs to remove a system pear, the below given command will execute the process.
ptconfigure pear pkg-remove --package-name="somename"
kevell@corp:/# ptconfigure pear pkg-remove --package-name="file"
pear/File (version >= 1.4.0) is required by installed package "pear/File_CSV"
pear/File (version >= 1.4.0) is required by installed package "pear/File_Util"
pear/File cannot be uninstalled, other installed packages depend on this package
[Pharaoh Logging] Removing Package file from the Packager Pear did not execute correctly
******************************
Pear Modifications:
--------------------------------------------
Pear: Failure
------------------------------
Pear Mods Finished
******************************
When the user needs to ensure a pear, the below given command will execute the process..
ptconfigure pear pkg-ensure --package-name="somename"
kevell@corp:/# ptconfigure pear pkg-ensure --package-name="file"
downloading File-1.4.1.tgz ...
Starting to download File-1.4.1.tgz (8,164 bytes)
.....done: 8,164 bytes
install ok: channel://pear.php.net/File-1.4.1
******************************
Pear Modifications:
--------------------------------------------
Pear: Success
------------------------------
Pear Mods Finished
******************************
There are two alternative parameters which can be used in command line.
Pear, pear
Pear.php.net provides both a human-friendly (HTML) and machine-friendly (currently REST) interface to the packages available from pear.php.net. All communication occurs over the HTTP protocol. Other functions the pear.php.net site provides are: