Skip to content
This is the definitive source of PEAR's core files.
PHP C HTML Yacc Batchfile Groff
Find file
Failed to load latest commit information.
OS Get rid of $Id$ comments
PEAR BUG #20991: Strict standards (function signatures)
docs Get rid of $Id$ comments
man1 Implement #20333: New role=man and man pages for pear/pecl/peardev/pe…
man5 Implement #20333: New role=man and man pages for pear/pecl/peardev/pe…
packages re-organize as per PEAR-Core discussion
scripts remove debug statements
tests Implement #20333: New role=man and man pages for pear/pecl/peardev/pe…
.gitignore adjust build instructions
.travis.yml fix warning on PHP7; make travis use this pear
CODING_STANDARDS Get rid of $Id$ comments
INSTALL Get rid of $Id$ comments
LICENSE Add the new bsd 2 clause license instead of the php one
Makefile.frag - Fixed bug #25348 ("make install" fails with --enable-short-tags).
PEAR.php Fix #21001: PEAR_ERROR_DIE exit code is 0
README.rst adjust build instructions
System.php fix failing tests adjust build instructions
catalog * added sgml/xml catalog file
go-pear-list.php Get rid of $Id$ comments
go-pear-phar.php update to PEAR/Start/CLI.php
install-pear.php Implement #20333: New role=man and man pages for pear/pecl/peardev/pe…
install-pear.txt * the "a" in "pear" is "application" now
make-command-xml.php Be more verbose.
make-gopear-phar.php Get rid of unused compat code for PHP 4 and PHP < 5.2
make-installpear-nozlib-phar.php Get rid of unused compat code for PHP 4 and PHP < 5.2
make-pear-bundle.php Get rid of $Id$ comments
package-ErrorStack.xml Increase minimum PHP dependency to 5.4.0
package-manpages.xml pear manpages version 1.10.0
package.dtd fix Bug #5866: <filelist> tag made mandatory in package 1.0 DTD
package2.xml Release version 1.10.1
template.spec * fix Bug #6034: date format bug
test-modified.php Cosmetics and adjust the pear2/all thing to also allow people to use …


PEAR - The PEAR Installer

What is the PEAR Installer? What is PEAR?

PEAR is the PHP Extension and Application Repository, found at

The PEAR Installer is this software, which contains executable files and PHP code that is used to download and install PEAR code from

PEAR contains useful software libraries and applications such as MDB2 (database abstraction), HTML_QuickForm (HTML forms management), PhpDocumentor (auto-documentation generator), DB_DataObject (Data Access Abstraction), and many hundreds more. Browse all available packages at, the list is constantly growing and updating to reflect improvements in the PHP language.


Do not run PEAR without installing it - if you downloaded this tarball manually, you MUST install it. Read the instructions in INSTALL prior to use.


Documentation for PEAR can be found at Installation documentation can be found in the INSTALL file included in this tarball.


Run the tests without installation as follows:

$ ./scripts/ run-tests -r tests

You should have the Text_Diff package installed to get nicer error output.

To run the tests with another PHP version, modify php_bin and set the PHP_PEAR_PHP_BIN environment variable:

$ pear config-set php_bin /usr/local/bin/php7
$ PHP_PEAR_PHP_BIN=/usr/local/bin/php7 ./scripts/ run-tests -r tests

Happy PHPing, we hope PEAR will be a great tool for your development work!

Test dependencies

  • zlib


Create a PEAR package as well as phars for pear-less installation:

$ rm -f PEAR-*.tgz
$ pear package package2.xml
$ cd go-pear-tarballs
$ rm -f PEAR-*
$ cp ../PEAR-*.tgz .
$ gunzip PEAR-*.tgz
$ pear download -Z Archive_Tar Console_Getopt Structures_Graph XML_Util
$ mkdir src && cd src
$ for i in ../*.tar; do tar xvf $i; done
$ mv *\/* .
$ cd ../../
$ php make-gopear-phar.php
$ php make-installpear-nozlib-phar.php

(Or simply run

go-pear.phar is contains the PEAR installer installer that asks questions where to install it. It is available from

install-pear-nozlib.phar installs PEAR automatically without asking anything. It is shipped with PHP itself.

Something went wrong with that request. Please try again.