1.2. Installing
Prev | Chapter 1. PHPlot Installation | Next

## 1.2. Installing

Unpack the PHPlot distribution into a convenient directory. Recent releases of PHPlot are available both as ZIP files, and as gzip-compressed TAR files. Use whichever format is more convenient for you. In the example below, the TAR format is unpacked.

    $ tar -xvzf phplot-5.*.tar.gz
    $ cd phplot-5.*

(Use the appropriate filename.) Check the distribution for README and/or INSTALL files which may contain newer instructions.

Installation of PHPlot simply involves copying the script files somewhere your PHP application scripts will be able to find them. The scripts are: `phplot.php`, the main script file, and `rgb.inc.php`, an optional script file containing a large color map. Make sure the protections on these files allow the web server to read them. For example:

    $ chmod 644 *.php

Then, simply copy the files into a directory where PHP scripts will be able to include them. The ideal place is a directory outside your web server document area, and on your PHP include path (that you noted above in the PHP Info report). You can add to the include path in the PHP configuration file; consult the PHP manual for details. For example, if `/usr/local/share/php` is on your PHP include path, you can install PHPlot with:

    $ cp phplot.php rgb.inc.php /usr/local/share/php

Prev | Up | Next
Chapter 1. PHPlot Installation | Home | 1.3. Next Step