The most important thing to understand is how the PEAR installer actually installs files. Most PHP developers distribute their applications as unzip-and-go archives. As such, we tend to assume that files will be in the exact same relative locations on the end user's machine that they are on our development machine. PEAR, however, is designed to be far more flexible than this.
For instance, it is common for shared web hosts to install a global copy of PEAR, but users can also install local copies and use the include_path
from php.ini
to choose local packages when available and global ones when they are not. In order to make this flexibility possible, PEAR groups and installs files by their type or file role.
Each file role has a corresponding configuration entry that defines the location at which all files of that file role will be installed. For instance, the php file role has a configuration variable named php_dir
that defines the directory into which...