Page 67 - Open Soource Technologies 304.indd
P. 67
Open Source Technologies
Notes 1. Installation prefix :/usr/local
2. Binaries directory : $prefix/bin
3. PHP code directory : $prefix/share/pear
4. Documentation base directory : $php_dir/docs
5. Data base directory : $php_dir/data
6. Tests base directory : $php_dir/tests
1-6, ‘all’ or Enter to continue:
Each setting is internally assigned to a variable (prefix, bin_dir, php_dir, doc_dir, data_dir and
test_dir, respectively). You may refer to the value of other settings by referencing these variables,
as shown previously. Let’s take a look at each setting:
Installation prefix: The root directory of your PEAR installation. It has no other effect than
serving as a root for the next five settings, using $prefix.
Binaries directory: Where programs and PHP scripts from PEAR packages are installed. The
pear executable ends up here. Remember to add this directory to your PATH.
PHP code directory: Where PHP code is installed. This directory must be in your include_path
when using the packages you install.
Documentation base directory: The base directory for documentation. By default, it is $php_dir/
doc, and the documentation files for each package are installed as $doc_dir/Package/file.
Database directory: Where the PEAR Installer stores data files. Data files are just a catch-all
category for anything that does not fit as PHP code, documentation, and so on. As with the
documentation base directory, the package name is added to the path, so the data file convert.
xsl in MyPackage would be installed as $data_dir/MyPackage/convert.xsl.
Tests base directory: Where regression test scripts for the package are installed. The package
name is also added to the directory. When you are satisfied with the directory layout, press
Enter to proceed: The following PEAR packages are bundled with PHP: DB, Net_Socket.
Draw PHP Welcome screen
?Net_SMTP, Mail, XML_Parser, PHPUnit2.
Would you like to install these as well? [Y/n] :
For your convenience, go-pear requests whether you want to install the PFC
packages. Just install them (press Enter):
Loading zlib: ok
Downloading package: PEAR.............ok
Downloading package: Archive_Tar......ok
Contd...
62 LOVELY PROFESSIONAL UNIVERSITY