12.4. CLI Environment

PEAR lets you include command-line scripts in a package. However, when doing so, you will quickly run into configuration problems like, “Which include_path should I use here” or “What is the full path of the PHP executable that should be used?” This information may be specified by users in a set of environment variables, as shown in Table 12.1.

Table 12.1. PEAR Installer Environment Variables
Environment VariableCorresponding Configuration Parameter
PHP_PEAR_SYSCONF_DIRnone
PHP_PEAR_MASTER_SERVERmaster_server
PHP_PEAR_HTTP_PROXYhttp_proxy
PHP_PEAR_INSTALL_DIRphp_dir
PHP_PEAR_EXTENSION_DIRext_dir
PHP_PEAR_DOC_DIRdoc_dir
PHP_PEAR_BIN_DIRbin_dir
PHP_PEAR_DATA_DIRdata_dir
PHP_PEAR_TEST_DIRtest_dir
PHP_PEAR_CACHE_DIRcache_dir
PHP_PEAR_PHP_BIN ...

Get PHP 5 Power Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.