1.2. Installing

Unpack the PHPlot distribution into a convenient directory. PHPlot releases 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-6.*.tar.gz
$ cd phplot-6.*

(Use the appropriate file and directory (folder) name.) 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


On Windows systems, you can simply download the release ZIP file, expand it using Windows Explorer, and copy the needed script file(s) out of the contained phplot-* folder into place.

SourceForge.net Logo

This version of the manual was produced for the PHPlot Sourceforge project web service site, which requires the logo on each page.

To download a logo-free copy of the manual, see the PHPlot project downloads area.